~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/plugin.py

  • Committer: Martin Pool
  • Date: 2005-06-27 06:58:04 UTC
  • Revision ID: mbp@sourcefrog.net-20050627065804-cf77bc472d9df611
- allow run_bzr to be invoked repeatedly without complaining
  about repeatedly loading plugins

Show diffs side-by-side

added added

removed removed

Lines of Context:
47
47
    such as *.pyd).
48
48
    """
49
49
 
 
50
    global all_plugins
 
51
    if all_plugins:
 
52
        return # plugins already initialized
 
53
 
50
54
    import sys, os, imp
51
55
    try:
52
56
        set
60
64
    if bzrpath is None:
61
65
        bzrpath = DEFAULT_PLUGIN_PATH
62
66
 
63
 
    global all_plugins
64
 
    if all_plugins:
65
 
        raise BzrError("plugins already initialized")
66
 
 
67
67
    # The problem with imp.get_suffixes() is that it doesn't include
68
68
    # .pyo which is technically valid
69
69
    # It also means that "testmodule.so" will show up as both test and testmodule