"'BzrCommandError' is not defined" error following entering email server password incorrectly

Bug #120537 reported by Stuart Colville
10
Affects Status Importance Assigned to Milestone
bzr email commit hook
Fix Released
Low
Jelmer Vernooij

Bug Description

Using the plugin if I am using the smtplib and enter my password incorrectly I get the following error:

bzr: ERROR: exceptions.NameError: global name 'BzrCommandError' is not defined

Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/bzrlib/commands.py", line 718, in run_bzr_catch_errors
    return run_bzr(argv)
  File "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/bzrlib/commands.py", line 679, in run_bzr
    ret = run(*run_argv)
  File "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/bzrlib/commands.py", line 375, in run_argv_aliases
    return self.run(**all_cmd_args)
  File "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/bzrlib/builtins.py", line 2210, in run
    reporter=reporter, revprops=properties)
  File "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/bzrlib/decorators.py", line 165, in write_locked
    return unbound(self, *args, **kwargs)
  File "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/bzrlib/workingtree_4.py", line 245, in commit
    result = WorkingTree3.commit(self, message, revprops, *args, **kwargs)
  File "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/bzrlib/decorators.py", line 165, in write_locked
    return unbound(self, *args, **kwargs)
  File "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/bzrlib/mutabletree.py", line 195, in commit
    revprops=revprops, *args, **kwargs)
  File "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/bzrlib/commit.py", line 377, in commit
    self.rev_id)
  File "/Users/monkey/.bazaar/plugins/email/__init__.py", line 52, in branch_commit_hook
    local_branch=local).send_maybe()
  File "/Users/monkey/.bazaar/plugins/email/emailer.py", line 229, in send_maybe
    self.send()
  File "/Users/monkey/.bazaar/plugins/email/emailer.py", line 173, in send
    self._send_using_smtplib()
  File "/Users/monkey/.bazaar/plugins/email/emailer.py", line 222, in _send_using_smtplib
    self.diff_filename())
  File "/Users/monkey/.bazaar/plugins/email/smtp_connection.py", line 223, in send_text_and_attachment_email
    self.send_email(msg, from_email, to_emails)
  File "/Users/monkey/.bazaar/plugins/email/smtp_connection.py", line 184, in send_email
    self._connect()
  File "/Users/monkey/.bazaar/plugins/email/smtp_connection.py", line 65, in _connect
    self._authenticate()
  File "/Users/monkey/.bazaar/plugins/email/smtp_connection.py", line 93, in _authenticate
    raise BzrCommandError('SMTP server refused authentication: %d %s'
NameError: global name 'BzrCommandError' is not defined

bzr 0.16.0 on python 2.5.0.final.0 (darwin)
arguments: ['/Library/Frameworks/Python.framework/Versions/Current/bin/bzr', 'ci', '-m', 'added tabs css']

Related branches

Revision history for this message
Jelmer Vernooij (jelmer) wrote :

Fixed in the attached branch. Still needs tests, but those are a little trickier to do (needs custom SMTP server).

Changed in bzr-email:
assignee: nobody → jelmer
importance: Undecided → Low
status: Unconfirmed → Fix Committed
Revision history for this message
Stuart Colville (muffinresearch) wrote :

Confirmed that fix works fine.

Jelmer Vernooij (jelmer)
Changed in bzr-email:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.