finder: Remove ModuleNotFoundError handler.

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 <anders@zulipchat.com>
This commit is contained in:
Anders Kaseorg 2020-04-18 17:58:46 -07:00 committed by Tim Abbott
parent f9d6c085a1
commit 1a417b1610

View file

@ -29,8 +29,6 @@ def import_module_by_name(name: Text) -> Any:
return importlib.import_module(name) return importlib.import_module(name)
except ImportError: except ImportError:
return None return None
except ModuleNotFoundError: # Specific exception supported >=Python3.6
return None
def resolve_bot_path(name: Text) -> Optional[Tuple[Text, Text]]: def resolve_bot_path(name: Text) -> Optional[Tuple[Text, Text]]:
if os.path.isfile(name): if os.path.isfile(name):