diff --git a/dyn_gandi/main.py b/dyn_gandi/main.py index 24ef006..4bb7f76 100644 --- a/dyn_gandi/main.py +++ b/dyn_gandi/main.py @@ -1,10 +1,13 @@ import requests, json, re, os from datetime import datetime -def loadSettings() -> dict: +def loadSettings(path = None) -> dict: + if path is None: + path = f"{os.path.expanduser('~')}/config.json" + # TODO: check integrity try: - with open('config.json', 'r') as file: + with open(path, 'r') as file: # Read if the API keys are path to files config = json.load(file) keys = config['api'].keys()