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:
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)

View File

@ -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)