diff --git a/util/config.py b/util/config.py index d9d87e7..c1f4c17 100755 --- a/util/config.py +++ b/util/config.py @@ -53,8 +53,15 @@ def load_config(self): """ # Open the YAML config file and load its contents try: - with open(self.config_path, "r") as file: - config = yaml.safe_load(file) + try: + with open(self.config_path, "r") as file: + config = yaml.safe_load(file) + except FileNotFoundError: + logger.error(f"Config file not found at {self.config_path}") + return + except yaml.parser.ParserError as e: + logger.error(f"Error parsing config file: {e}") + return except FileNotFoundError: logger.error(f"Config file not found at {self.config_path}") return