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

This commit is contained in:
Denis Fomin 2012-08-09 21:48:00 +04:00
parent 57c8fdad39
commit 8295089b95
1 changed files with 4 additions and 1 deletions

View File

@ -100,7 +100,7 @@ class PluginManager(object):
'''
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)
self.add_plugins(pc)
self._activate_all_plugins_from_global_config()
@ -433,6 +433,9 @@ class PluginManager(object):
elif os.path.isdir(file_path) and scan_dirs:
module_name = elem_name
if module_name in sys.modules:
# do not load the module twice
continue
file_path += os.path.sep
try:
module = __import__(module_name)