Skip to content

Commit 64775f5

Browse files
committed
Fix "ModuleNotFoundError is not defined" error for Python <3.6
1 parent 2a9c344 commit 64775f5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pyrogram/client/client.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1179,7 +1179,7 @@ def load_plugins(self):
11791179

11801180
try:
11811181
module = import_module(module_path)
1182-
except ModuleNotFoundError:
1182+
except ImportError:
11831183
log.warning('[LOAD] Ignoring non-existent module "{}"'.format(module_path))
11841184
continue
11851185

@@ -1215,7 +1215,7 @@ def load_plugins(self):
12151215

12161216
try:
12171217
module = import_module(module_path)
1218-
except ModuleNotFoundError:
1218+
except ImportError:
12191219
log.warning('[UNLOAD] Ignoring non-existent module "{}"'.format(module_path))
12201220
continue
12211221

0 commit comments

Comments
 (0)