[Pkg-bazaar-commits] ./bzr/unstable r798: - allow run_bzr to be invoked repeatedly without complaining
Martin Pool
mbp at sourcefrog.net
Fri Apr 10 08:21:04 UTC 2009
------------------------------------------------------------
revno: 798
committer: Martin Pool <mbp at sourcefrog.net>
timestamp: Mon 2005-06-27 16:58:04 +1000
message:
- allow run_bzr to be invoked repeatedly without complaining
about repeatedly loading plugins
modified:
bzrlib/plugin.py
-------------- next part --------------
=== modified file 'bzrlib/plugin.py'
--- a/bzrlib/plugin.py 2005-06-27 06:10:15 +0000
+++ b/bzrlib/plugin.py 2005-06-27 06:58:04 +0000
@@ -47,6 +47,10 @@
such as *.pyd).
"""
+ global all_plugins
+ if all_plugins:
+ return # plugins already initialized
+
import sys, os, imp
try:
set
@@ -60,10 +64,6 @@
if bzrpath is None:
bzrpath = DEFAULT_PLUGIN_PATH
- global all_plugins
- if all_plugins:
- raise BzrError("plugins already initialized")
-
# The problem with imp.get_suffixes() is that it doesn't include
# .pyo which is technically valid
# It also means that "testmodule.so" will show up as both test and testmodule
More information about the Pkg-bazaar-commits
mailing list