diff --git a/bibigrid/core/utility/handler/configuration_handler.py b/bibigrid/core/utility/handler/configuration_handler.py index 608c8e42..1a73cc9a 100644 --- a/bibigrid/core/utility/handler/configuration_handler.py +++ b/bibigrid/core/utility/handler/configuration_handler.py @@ -3,6 +3,7 @@ """ import os +import sys import mergedeep import yaml @@ -31,8 +32,10 @@ def read_configuration(log, path, configuration_list=True): configuration = yaml.safe_load(stream) except yaml.YAMLError as exc: log.warning("Couldn't read configuration %s: %s", path, exc) + sys.exit(1) else: log.warning("No such configuration file %s.", path) + sys.exit(1) if configuration_list and not isinstance(configuration, list): log.warning("Configuration should be list. Attempting to rescue by assuming a single configuration.") return [configuration]