raise OperationalException if config is missing
This commit is contained in:
parent
d23bcc435a
commit
27f83b511f
@ -61,11 +61,9 @@ class Configuration(object):
|
|||||||
with open(path) as file:
|
with open(path) as file:
|
||||||
conf = json.load(file)
|
conf = json.load(file)
|
||||||
except FileNotFoundError:
|
except FileNotFoundError:
|
||||||
logger.critical(
|
raise OperationalException(
|
||||||
'Config file "%s" not found. Please create your config file',
|
'Config file "{}" not found!'
|
||||||
path
|
' Please create a config file or check whether it exists.'.format(path))
|
||||||
)
|
|
||||||
exit(0)
|
|
||||||
|
|
||||||
if 'internals' not in conf:
|
if 'internals' not in conf:
|
||||||
conf['internals'] = {}
|
conf['internals'] = {}
|
||||||
|
Loading…
Reference in New Issue
Block a user