Fix: Crash when kheops config file is missing
This commit is contained in:
parent
62c0d7352f
commit
4f28bdc66b
@ -244,7 +244,11 @@ class Kheops(GenericInstance):
|
|||||||
|
|
||||||
# Load config
|
# Load config
|
||||||
if isinstance(config, str):
|
if isinstance(config, str):
|
||||||
dict_conf = anyconfig.load(config)
|
try:
|
||||||
|
dict_conf = anyconfig.load(config)
|
||||||
|
except FileNotFoundError as err:
|
||||||
|
log.error("Can't find keops configuration file: %s", config)
|
||||||
|
sys.exit(1)
|
||||||
source = f"file:{config}"
|
source = f"file:{config}"
|
||||||
elif isinstance(config, dict):
|
elif isinstance(config, dict):
|
||||||
dict_conf = config
|
dict_conf = config
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user