~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/errors.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2007-08-13 12:24:44 UTC
  • mfrom: (2694.2.2 no-local-smtp)
  • Revision ID: pqm@pqm.ubuntu.com-20070813122444-5pi8f4fwxqpgxs1x
Make error handling nicer when SMTP server not working

Show diffs side-by-side

added added

removed removed

Lines of Context:
2308
2308
 
2309
2309
    def __init__(self, error):
2310
2310
        self.error = error
 
2311
 
 
2312
 
 
2313
class SMTPConnectionRefused(SMTPError):
 
2314
 
 
2315
    _fmt = "SMTP connection to %(host)s refused"
 
2316
 
 
2317
    def __init__(self, error, host):
 
2318
        self.error = error
 
2319
        self.host = host
 
2320
 
 
2321
 
 
2322
class DefaultSMTPConnectionRefused(SMTPConnectionRefused):
 
2323
 
 
2324
    _fmt = "Please specify smtp_server.  No server at default %(host)s."