From 4f28bdc66bca2b9da61129e9b4195f22b2a508be Mon Sep 17 00:00:00 2001 From: mrjk Date: Mon, 14 Feb 2022 15:33:16 -0500 Subject: [PATCH] Fix: Crash when kheops config file is missing --- kheops/app.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/kheops/app.py b/kheops/app.py index 35ee93f..fd90856 100644 --- a/kheops/app.py +++ b/kheops/app.py @@ -244,7 +244,11 @@ class Kheops(GenericInstance): # Load config 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}" elif isinstance(config, dict): dict_conf = config