Skip to content
Snippets Groups Projects
Commit 8295089b authored by Dicson's avatar Dicson
Browse files

first load the plugins of the user directory. does not load the module twice.

parent 57c8fdad
No related branches found
No related tags found
No related merge requests found
...@@ -100,7 +100,7 @@ class PluginManager(object): ...@@ -100,7 +100,7 @@ class PluginManager(object):
''' '''
Registered handlers of GUI extension points. Registered handlers of GUI extension points.
''' '''
for path in gajim.PLUGINS_DIRS: for path in [gajim.PLUGINS_DIRS[1], gajim.PLUGINS_DIRS[0]):
pc = PluginManager.scan_dir_for_plugins(path) pc = PluginManager.scan_dir_for_plugins(path)
self.add_plugins(pc) self.add_plugins(pc)
self._activate_all_plugins_from_global_config() self._activate_all_plugins_from_global_config()
...@@ -433,6 +433,9 @@ class PluginManager(object): ...@@ -433,6 +433,9 @@ class PluginManager(object):
elif os.path.isdir(file_path) and scan_dirs: elif os.path.isdir(file_path) and scan_dirs:
module_name = elem_name module_name = elem_name
if module_name in sys.modules:
# do not load the module twice
continue
file_path += os.path.sep file_path += os.path.sep
try: try:
module = __import__(module_name) module = __import__(module_name)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment