Using a more classical path for the configuration

This commit is contained in:
Alarig Le Lay 2020-05-06 23:54:08 +02:00
parent 129a8cab46
commit e23d994dc1
Signed by: alarig
GPG key ID: 7AFE62C6DF8BCDEC

View file

@ -1,4 +1,4 @@
#!/usr/bin/env python3 #!/usr/bin/env python3.6
import requests import requests
import json import json
import yaml import yaml
@ -8,8 +8,9 @@ import tempfile
import os import os
import hashlib import hashlib
from subprocess import call from subprocess import call
from pathlib import Path
config = os.path.join(os.path.dirname(os.path.realpath(__file__)),"config.yml") config = Path.home()/".config/ripe-api.yml"
# Read configuration # Read configuration
with open(config, 'r') as ymlfile: with open(config, 'r') as ymlfile: