diff --git a/.gitignore b/.gitignore index 26d5159..01fc41a 100644 --- a/.gitignore +++ b/.gitignore @@ -15,6 +15,7 @@ logs/currency.log logs/error-log.txt logs/info-log.txt logs/startup-log.txt +config/settings.json __pycache__ *.bak venv diff --git a/config/settings.json b/config/settings.json deleted file mode 100644 index 0967ef4..0000000 --- a/config/settings.json +++ /dev/null @@ -1 +0,0 @@ -{} diff --git a/main.py b/main.py index 7783c12..66bd4bb 100644 --- a/main.py +++ b/main.py @@ -68,6 +68,16 @@ def initial_setup(): except IOError as e: logger.error(f"Failed to make database file: {e}", module="main/Setup") + # Generating other files + try: + if not os.path.isfile(f"config/settings.json"): + logger.warn(f"[main/Setup] Settings database file was not found in config directory. Creating new database...", module="main/Setup", nolog=True) + with open(f"config/settings.json", 'x', encoding="utf-8") as f: + json.dump({}, f) + f.close() + except IOError as e: + logger.error(f"Failed to make settings database file: {e}", module="main/Setup") + # Generating client log files try: if not os.path.isfile("logs/info-log.txt"):