aboutsummaryrefslogtreecommitdiff
path: root/config.py
diff options
context:
space:
mode:
authorParker <contact@pkrm.dev>2024-11-15 21:20:29 -0600
committerParker <contact@pkrm.dev>2024-11-15 21:20:29 -0600
commit1b1601e4c449254b114522b3c49ab4b126f89cc8 (patch)
tree60dcc2af04ae6e871a30042fb89401e70af11150 /config.py
parent4cfc800f8c38eafc54ce35155469d361ee07d8f7 (diff)
Update config and work on shell/docker
Diffstat (limited to 'config.py')
-rw-r--r--config.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/config.py b/config.py
index 620b301..9b6f23c 100644
--- a/config.py
+++ b/config.py
@@ -1,7 +1,6 @@
import jsonschema
import os
import yaml
-import sys
import logging
from colorlog import ColoredFormatter
@@ -66,7 +65,9 @@ config:
"`config.yaml` was not found, a template has been created."
" Please fill out the necessary information and restart."
)
- sys.exit()
+ return False
+
+ return True
# Validate the options within config.yaml
@@ -78,7 +79,7 @@ def validate_config(file_contents):
jsonschema.validate(config, schema)
except jsonschema.ValidationError as e:
LOG.error(e.message)
- sys.exit()
+ return False
# Make IP_TO_LOCATION a boolean
IP_TO_LOCATION = bool(config["config"]["ip_to_location"])