mirror of
https://github.com/bellingcat/auto-archiver.git
synced 2026-06-11 04:38:29 +03:00
Fix ref before assignment in orchestrator.py
This commit is contained in:
@@ -302,11 +302,12 @@ class ArchivingOrchestrator:
|
||||
if module in invalid_modules:
|
||||
continue
|
||||
|
||||
loaded_module = None
|
||||
try:
|
||||
loaded_module: BaseModule = self.module_factory.get_module(module, self.config)
|
||||
except (KeyboardInterrupt, Exception) as e:
|
||||
logger.error(f"Error during setup of modules: {e}\n{traceback.format_exc()}")
|
||||
if module_type == 'extractor' and loaded_module.name == module:
|
||||
if loaded_module and module_type == 'extractor':
|
||||
loaded_module.cleanup()
|
||||
raise e
|
||||
|
||||
|
||||
Reference in New Issue
Block a user