From ca1ed418aaa78d32e033387d6670ba8627d775ab Mon Sep 17 00:00:00 2001 From: Patrick Robertson Date: Mon, 24 Feb 2025 21:46:24 +0000 Subject: [PATCH] Throw an error for invalid __manifest__ syntax + fix: allow default values of False/None --- src/auto_archiver/core/module.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/auto_archiver/core/module.py b/src/auto_archiver/core/module.py index 9f20084..5442e71 100644 --- a/src/auto_archiver/core/module.py +++ b/src/auto_archiver/core/module.py @@ -186,7 +186,7 @@ class LazyBaseModule: try: manifest.update(ast.literal_eval(f.read())) except (ValueError, TypeError, SyntaxError, MemoryError, RecursionError) as e: - logger.error(f"Error loading manifest from file {self.path}/{MANIFEST_FILE}: {e}") + raise ValueError(f"Error loading manifest from file {self.path}/{MANIFEST_FILE}: {e}") self._manifest = manifest self._entry_point = manifest['entry_point'] @@ -256,7 +256,7 @@ class LazyBaseModule: instance.module_factory = self.module_factory # merge the default config with the user config - default_config = dict((k, v['default']) for k, v in self.configs.items() if v.get('default')) + default_config = dict((k, v['default']) for k, v in self.configs.items() if 'default' in v) config[self.name] = default_config | config.get(self.name, {}) instance.config_setup(config)