From 48363c94e4cdeb9de4d8a63239030dfa73bb3e9c Mon Sep 17 00:00:00 2001 From: Fabio Manganiello Date: Tue, 20 Feb 2018 22:58:13 +0100 Subject: [PATCH] s/ModuleNotFoundError/ImportError/g --- platypush/context/__init__.py | 2 +- platypush/utils/__init__.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/platypush/context/__init__.py b/platypush/context/__init__.py index d5d9829fcd..874598be8a 100644 --- a/platypush/context/__init__.py +++ b/platypush/context/__init__.py @@ -61,7 +61,7 @@ def get_plugin(plugin_name, reload=False): try: plugin = importlib.import_module('platypush.plugins.' + plugin_name) - except ModuleNotFoundError as e: + except ImportError as e: logging.warning('No such plugin: {}'.format(plugin_name)) raise RuntimeError(e) diff --git a/platypush/utils/__init__.py b/platypush/utils/__init__.py index f254a453e9..6fcc2dc571 100644 --- a/platypush/utils/__init__.py +++ b/platypush/utils/__init__.py @@ -20,7 +20,7 @@ def get_message_class_by_type(msgtype): try: module = importlib.import_module('platypush.message.' + msgtype) - except ModuleNotFoundError as e: + except ImportError as e: logging.warning('Unsupported message type {}'.format(msgtype)) raise RuntimeError(e)