Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
gajim
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
eta
gajim
Commits
8295089b
Commit
8295089b
authored
12 years ago
by
Dicson
Browse files
Options
Downloads
Patches
Plain Diff
first load the plugins of the user directory. does not load the module twice.
parent
57c8fdad
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/plugins/pluginmanager.py
+4
-1
4 additions, 1 deletion
src/plugins/pluginmanager.py
with
4 additions
and
1 deletion
src/plugins/pluginmanager.py
+
4
−
1
View file @
8295089b
...
@@ -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
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment