From e7aa32817818408268da4583448215449ae35a16 Mon Sep 17 00:00:00 2001 From: Sean Breckenridge Date: Wed, 9 Feb 2022 14:26:50 -0800 Subject: [PATCH] source: use import error uses the more broad ImportError instead of ModuleNotFoundError reasoning being if some submodule (the one I'm configuring currently is my.twitter.twint) doesn't have additional imports from another parser/DAL, but it still has a config block, the user would have to create a stub-config block in their config to use the all.py file --- my/core/source.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/my/core/source.py b/my/core/source.py index 3748e4d..d91c2a4 100644 --- a/my/core/source.py +++ b/my/core/source.py @@ -43,7 +43,7 @@ def import_source( try: res = factory_func(**kwargs) yield from res - except ModuleNotFoundError: + except ImportError: from . import core_config as CC suppressed_in_conf = False if module_name is not None and CC.config._is_module_active(module_name) is False: