diff options
author | Marien Zwart <marienz@gentoo.org> | 2006-04-05 17:41:21 +0200 |
---|---|---|
committer | Marien Zwart <marienz@gentoo.org> | 2006-04-05 17:41:21 +0200 |
commit | 47f552ea663ccf37097051ed7c42ffaa754704dc (patch) | |
tree | 60cdd582ea80d82259b57b5b77ef0bc30241b7b2 | |
parent | 7be507f7dd05da93e241f35c1cda7afa14d82671 (diff) | |
download | bugseverywhere-47f552ea663ccf37097051ed7c42ffaa754704dc.tar.gz |
Determine plugin_path from the location of the plugin module, not from argv[0].
-rw-r--r-- | libbe/plugin.py | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/libbe/plugin.py b/libbe/plugin.py index b175733..4016ca1 100644 --- a/libbe/plugin.py +++ b/libbe/plugin.py @@ -52,9 +52,7 @@ def get_plugin(prefix, name): return my_import(prefix + "." + name) return None -plugin_path = sys.path[0] -while not os.path.isfile(os.path.join(plugin_path, "libbe/plugin.py")): - plugin_path = os.path.realpath(os.path.dirname(plugin_path)) +plugin_path = os.path.realpath(os.path.dirname(os.path.dirname(__file__))) if plugin_path not in sys.path: sys.path.append(plugin_path) def _test(): |