mirror of
https://github.com/pyrogram/pyrogram
synced 2025-08-25 11:28:05 +00:00
Fix "ModuleNotFoundError is not defined" error for Python <3.6
This commit is contained in:
parent
2a9c34481f
commit
64775f5209
@ -1179,7 +1179,7 @@ class Client(Methods, BaseClient):
|
|||||||
|
|
||||||
try:
|
try:
|
||||||
module = import_module(module_path)
|
module = import_module(module_path)
|
||||||
except ModuleNotFoundError:
|
except ImportError:
|
||||||
log.warning('[LOAD] Ignoring non-existent module "{}"'.format(module_path))
|
log.warning('[LOAD] Ignoring non-existent module "{}"'.format(module_path))
|
||||||
continue
|
continue
|
||||||
|
|
||||||
@ -1215,7 +1215,7 @@ class Client(Methods, BaseClient):
|
|||||||
|
|
||||||
try:
|
try:
|
||||||
module = import_module(module_path)
|
module = import_module(module_path)
|
||||||
except ModuleNotFoundError:
|
except ImportError:
|
||||||
log.warning('[UNLOAD] Ignoring non-existent module "{}"'.format(module_path))
|
log.warning('[UNLOAD] Ignoring non-existent module "{}"'.format(module_path))
|
||||||
continue
|
continue
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user