We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cfe8dfe commit 44731f2Copy full SHA for 44731f2
python/plugins/db_manager/db_plugins/postgis/plugins/__init__.py
@@ -21,17 +21,19 @@
21
"""
22
23
import os
24
+from importlib import import_module
25
26
current_dir = os.path.dirname(__file__)
27
28
-def load(dbplugin, mainwindow):
29
+def load(db, mainwindow):
30
for name in os.listdir(current_dir):
31
if not os.path.isdir(os.path.join(current_dir, name)):
32
continue
33
+ if name in ('__pycache__'):
34
+ continue
35
try:
- exec(u"from .%s import load" % name)
36
+ plugin_module = import_module('.'.join((__package__, name)))
37
except ImportError:
38
-
- load(dbplugin, mainwindow)
39
+ plugin_module.load(db, mainwindow)
0 commit comments