Re-fix source importing

This commit is contained in:
Tim Van Baak 2020-12-29 20:14:56 -08:00
parent a1a15153c0
commit 428cf8df35
1 changed files with 2 additions and 1 deletions

View File

@ -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'):