/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/plugin.py

  • Committer: Martin Pool
  • Date: 2005-06-27 06:10:15 UTC
  • Revision ID: mbp@sourcefrog.net-20050627061015-ff4eaeb21cd8eacd
Patch from John:
- Use config_dir for default plugin dir
- Fix up disabling BZR_PLUGIN_PATH

Show diffs side-by-side

added added

removed removed

Lines of Context:
23
23
# plugin_cmds variable.
24
24
 
25
25
 
26
 
DEFAULT_PLUGIN_PATH = '~/.bzr.conf/plugins'
 
26
import os
 
27
from bzrlib.osutils import config_dir
 
28
DEFAULT_PLUGIN_PATH = os.path.join(config_dir(), 'plugins')
27
29
 
28
30
all_plugins = []
29
31
 
55
57
    from bzrlib.errors import BzrError
56
58
 
57
59
    bzrpath = os.environ.get('BZR_PLUGIN_PATH')
58
 
    if not bzrpath:
59
 
        bzrpath = os.path.expanduser(DEFAULT_PLUGIN_PATH)
 
60
    if bzrpath is None:
 
61
        bzrpath = DEFAULT_PLUGIN_PATH
60
62
 
61
63
    global all_plugins
62
64
    if all_plugins: