From 428cf8df3523e83bc61b4b15b16a678c6c4f16b8 Mon Sep 17 00:00:00 2001 From: Tim Van Baak Date: Tue, 29 Dec 2020 20:14:56 -0800 Subject: [PATCH] Re-fix source importing --- inquisitor/sources.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/inquisitor/sources.py b/inquisitor/sources.py index 401a5e7..0b48f1c 100644 --- a/inquisitor/sources.py +++ b/inquisitor/sources.py @@ -89,9 +89,10 @@ def load_source(source_name): # Import the source module by file path. logger.debug(f'Loading module "{source_file_name}"') - spec = importlib.util.spec_from_file_location("itemsource", source_file_name) + spec = importlib.util.spec_from_file_location(source_name, source_file_name) itemsource = importlib.util.module_from_spec(spec) spec.loader.exec_module(itemsource) + itemsource = importlib.import_module(source_name) # Require fetch_new(). if not hasattr(itemsource, 'fetch_new'):