~muffinresearch/bzr-email/bzr-email-keychain

« back to all changes in this revision

Viewing changes to smtp_connection.py

  • Committer: Stuart Colville
  • Date: 2007-08-14 09:46:01 UTC
  • mfrom: (25.1.1 bzr-email)
  • Revision ID: scol@yahoo-inc.com-20070814094601-2vhebomn8mftdzdz
merged http://bazaar.launchpad.net/~jelmer/bzr-email/120537

Show diffs side-by-side

added added

removed removed

Lines of Context:
31
31
import smtplib
32
32
 
33
33
from bzrlib import (
 
34
    errors,
34
35
    ui,
35
36
    __version__ as _bzrlib_version,
36
37
    )
87
88
        try:
88
89
            self._connection.login(self._smtp_username, self._smtp_password)
89
90
        except smtplib.SMTPHeloError, e:
90
 
            raise BzrCommandError('SMTP server refused HELO: %d %s'
 
91
            raise errors.BzrCommandError('SMTP server refused HELO: %d %s'
91
92
                                  % (e.smtp_code, e.smtp_error))
92
93
        except smtplib.SMTPAuthenticationError, e:
93
 
            raise BzrCommandError('SMTP server refused authentication: %d %s'
94
 
                                  % (e.smtp_code, e.smtp_error))
 
94
            raise errors.BzrCommandError(
 
95
                  'SMTP server refused authentication: %d %s' % 
 
96
                        (e.smtp_code, e.smtp_error))
95
97
        except smtplib.SMTPException, e:
96
 
            raise BzrCommandError(str(e))
 
98
            raise errors.BzrCommandError(str(e))
97
99
 
98
100
    @staticmethod
99
101
    def _split_address(address):