forked from platypush/platypush
s/ModuleNotFoundError/ImportError/g
This commit is contained in:
parent
779a907ebd
commit
48363c94e4
2 changed files with 2 additions and 2 deletions
|
@ -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)
|
||||||
|
|
||||||
|
|
|
@ -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)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue