Added config file location as current directory

This commit is contained in:
Ali Parlakci
2018-08-13 14:50:45 +03:00
parent ff68b5f70f
commit 3448ba15a9
2 changed files with 4 additions and 2 deletions

3
.gitignore vendored
View File

@@ -2,4 +2,5 @@ build/
dist/ dist/
MANIFEST MANIFEST
__pycache__/ __pycache__/
src/__pycache__/ src/__pycache__/
config.json

View File

@@ -657,7 +657,8 @@ def main():
if not Path(GLOBAL.configDirectory).is_dir(): if not Path(GLOBAL.configDirectory).is_dir():
os.makedirs(GLOBAL.configDirectory) os.makedirs(GLOBAL.configDirectory)
GLOBAL.config = getConfig(GLOBAL.configDirectory / "config.json") GLOBAL.config = getConfig("config.json") if Path("config.json").exists() \
else getConfig(GLOBAL.configDirectory / "config.json")
if GLOBAL.arguments.log is not None: if GLOBAL.arguments.log is not None:
logDir = Path(GLOBAL.arguments.log) logDir = Path(GLOBAL.arguments.log)