Rev 40: Check that the plugin is installed correctly rather than failing with an ImportError. in http://bazaar.launchpad.net/%7Ebzr/bzr-pqm/devel
John Arbash Meinel
john at arbash-meinel.com
Tue Nov 6 02:55:49 GMT 2007
At http://bazaar.launchpad.net/%7Ebzr/bzr-pqm/devel
------------------------------------------------------------
revno: 40
revision-id:john at arbash-meinel.com-20071106025532-7ovve1z25h4l87xp
parent: john at arbash-meinel.com-20071106024835-vdzn55wsylj6wdnh
committer: John Arbash Meinel <john at arbash-meinel.com>
branch nick: pqm_submit
timestamp: Mon 2007-11-05 20:55:32 -0600
message:
Check that the plugin is installed correctly rather than failing with an ImportError.
modified:
__init__.py __init__.py-20060221052551-30932fa7d369a24b
-------------- next part --------------
=== modified file '__init__.py'
--- a/__init__.py 2007-11-06 02:48:35 +0000
+++ b/__init__.py 2007-11-06 02:55:32 +0000
@@ -76,6 +76,13 @@
]
def run(self, location=None, message=None, public_location=None, dry_run=False):
+ if __name__ != 'bzrlib.plugins.pqm':
+ from bzrlib import trace
+ trace.warning('The bzr-pqm plugin needs to be called'
+ ' "bzrlib.plugins.pqm" not "%s"\n'
+ 'Please rename the plugin.',
+ __name__)
+ return 1
from bzrlib.plugins.pqm.pqm_submit import submit
if location is None:
More information about the bazaar-commits
mailing list