From 1a417b16102f24f3ab041fa3bca7f1abda6cad15 Mon Sep 17 00:00:00 2001 From: Anders Kaseorg Date: Sat, 18 Apr 2020 17:58:46 -0700 Subject: [PATCH] finder: Remove ModuleNotFoundError handler. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ModuleNotFoundError is a subclass of ImportError, which is handled on the previous line; furthermore, it doesn’t exist in Python 3.5. Signed-off-by: Anders Kaseorg --- zulip_bots/zulip_bots/finder.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/zulip_bots/zulip_bots/finder.py b/zulip_bots/zulip_bots/finder.py index dd01c27..80707bb 100644 --- a/zulip_bots/zulip_bots/finder.py +++ b/zulip_bots/zulip_bots/finder.py @@ -29,8 +29,6 @@ def import_module_by_name(name: Text) -> Any: return importlib.import_module(name) except ImportError: return None - except ModuleNotFoundError: # Specific exception supported >=Python3.6 - return None def resolve_bot_path(name: Text) -> Optional[Tuple[Text, Text]]: if os.path.isfile(name):