Rev 32: Use 'errors.BzrCommandError' in http://bzr.arbash-meinel.com/plugins/pqm
John Arbash Meinel
john at arbash-meinel.com
Thu Feb 1 15:48:01 GMT 2007
At http://bzr.arbash-meinel.com/plugins/pqm
------------------------------------------------------------
revno: 32
revision-id: john at arbash-meinel.com-20070201154753-3kyum1ykxs61jdma
parent: john at arbash-meinel.com-20070126153302-xyoxk57chci4ler7
committer: John Arbash Meinel <john at arbash-meinel.com>
branch nick: pqm
timestamp: Thu 2007-02-01 09:47:53 -0600
message:
Use 'errors.BzrCommandError'
modified:
pqm_submit.py pqm_submit.py-20060221060137-b3a3cdde9f50efab
-------------- next part --------------
=== modified file 'pqm_submit.py'
--- a/pqm_submit.py 2007-01-26 15:33:02 +0000
+++ b/pqm_submit.py 2007-02-01 15:47:53 +0000
@@ -38,8 +38,8 @@
merge_target = config.get_user_option('pqm_branch')
if not merge_target:
- raise BzrCommandError('No PQM target branch specified '
- 'in configuration')
+ raise errors.BzrCommandError('No PQM target branch specified '
+ 'in configuration')
unsigned_text = 'star-merge %s %s' % (target_base, merge_target)
@@ -90,8 +90,8 @@
user_from = user_from.encode('utf8') # Make sure this isn't unicode
user_to = config.get_user_option('pqm_email')
if not user_to:
- raise BzrCommandError('No PQM submission address specified '
- 'in configuration')
+ raise errors.BzrCommandError('No PQM submission address specified '
+ 'in configuration')
user_to = user_to.encode('utf8') # same here
# All the entries must be utf-8 so the message creation doesn't fail
@@ -109,10 +109,10 @@
target_base = public_location
if target_base is None:
- raise BzrCommandError('Could not find public location, either'
- 'specify with --public-location, or see'
- ' "bzr help pqm-submit" to see how to set'
- 'it in ~/.bazaar/locations.conf')
+ raise errors.BzrCommandError('Could not find public location, either'
+ 'specify with --public-location, or see'
+ ' "bzr help pqm-submit" to see how to set'
+ 'it in ~/.bazaar/locations.conf')
note('Checking that the public branch is up to date ...')
try:
@@ -144,13 +144,13 @@
try:
smtp.login(smtp_username, smtp_password)
except smtplib.SMTPHeloError, e:
- raise BzrCommandError('SMTP server refused HELO: %d %s'
- % (e.smtp_code, e.smtp_error))
+ raise errors.BzrCommandError('SMTP server refused HELO: %d %s'
+ % (e.smtp_code, e.smtp_error))
except smtplib.SMTPAuthenticationError, e:
- raise BzrCommandError('SMTP server refused authentication: %d %s'
- % (e.smtp_code, e.smtp_error))
+ raise errors.BzrCommandError('SMTP server refused authentication: %d %s'
+ % (e.smtp_code, e.smtp_error))
except smtplib.SMTPException, e:
- raise BzrCommandError(str(e))
+ raise errors.BzrCommandError(str(e))
smtp.sendmail(user_from, [user_to], msg)
More information about the bazaar-commits
mailing list