s/ModuleNotFoundError/ImportError/g

This commit is contained in:
Fabio Manganiello 2018-02-20 22:58:13 +01:00
parent 779a907ebd
commit 48363c94e4
2 changed files with 2 additions and 2 deletions

View file

@ -61,7 +61,7 @@ def get_plugin(plugin_name, reload=False):
try: try:
plugin = importlib.import_module('platypush.plugins.' + plugin_name) plugin = importlib.import_module('platypush.plugins.' + plugin_name)
except ModuleNotFoundError as e: except ImportError as e:
logging.warning('No such plugin: {}'.format(plugin_name)) logging.warning('No such plugin: {}'.format(plugin_name))
raise RuntimeError(e) raise RuntimeError(e)

View file

@ -20,7 +20,7 @@ def get_message_class_by_type(msgtype):
try: try:
module = importlib.import_module('platypush.message.' + msgtype) module = importlib.import_module('platypush.message.' + msgtype)
except ModuleNotFoundError as e: except ImportError as e:
logging.warning('Unsupported message type {}'.format(msgtype)) logging.warning('Unsupported message type {}'.format(msgtype))
raise RuntimeError(e) raise RuntimeError(e)