[Pkg-bazaar-commits] ./bzr/unstable r795: Patch from John:
Martin Pool
mbp at sourcefrog.net
Fri Apr 10 08:21:04 UTC 2009
------------------------------------------------------------
revno: 795
committer: Martin Pool <mbp at sourcefrog.net>
timestamp: Mon 2005-06-27 16:10:15 +1000
message:
Patch from John:
- Use config_dir for default plugin dir
- Fix up disabling BZR_PLUGIN_PATH
modified:
bzrlib/plugin.py
-------------- next part --------------
=== modified file 'bzrlib/plugin.py'
--- a/bzrlib/plugin.py 2005-06-22 09:33:59 +0000
+++ b/bzrlib/plugin.py 2005-06-27 06:10:15 +0000
@@ -23,7 +23,9 @@
# plugin_cmds variable.
-DEFAULT_PLUGIN_PATH = '~/.bzr.conf/plugins'
+import os
+from bzrlib.osutils import config_dir
+DEFAULT_PLUGIN_PATH = os.path.join(config_dir(), 'plugins')
all_plugins = []
@@ -55,8 +57,8 @@
from bzrlib.errors import BzrError
bzrpath = os.environ.get('BZR_PLUGIN_PATH')
- if not bzrpath:
- bzrpath = os.path.expanduser(DEFAULT_PLUGIN_PATH)
+ if bzrpath is None:
+ bzrpath = DEFAULT_PLUGIN_PATH
global all_plugins
if all_plugins:
More information about the Pkg-bazaar-commits
mailing list