Fix "ModuleNotFoundError is not defined" error for Python <3.6

This commit is contained in:
Dan 2019-03-04 12:50:42 +01:00
parent 2a9c34481f
commit 64775f5209

View File

@ -1179,7 +1179,7 @@ class Client(Methods, BaseClient):
try:
module = import_module(module_path)
except ModuleNotFoundError:
except ImportError:
log.warning('[LOAD] Ignoring non-existent module "{}"'.format(module_path))
continue
@ -1215,7 +1215,7 @@ class Client(Methods, BaseClient):
try:
module = import_module(module_path)
except ModuleNotFoundError:
except ImportError:
log.warning('[UNLOAD] Ignoring non-existent module "{}"'.format(module_path))
continue