/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to breezy/errors.py

  • Committer: Jelmer Vernooij
  • Date: 2020-08-10 15:00:17 UTC
  • mfrom: (7490.40.99 work)
  • mto: This revision was merged to the branch mainline in revision 7521.
  • Revision ID: jelmer@jelmer.uk-20200810150017-vs7xnrd1vat4iktg
Merge lp:brz/3.1.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1282
1282
 
1283
1283
class UnexpectedHttpStatus(InvalidHttpResponse):
1284
1284
 
1285
 
    _fmt = "Unexpected HTTP status %(code)d for %(path)s"
 
1285
    _fmt = "Unexpected HTTP status %(code)d for %(path)s: %(extra)s"
1286
1286
 
1287
 
    def __init__(self, path, code, msg=None):
 
1287
    def __init__(self, path, code, extra=None):
1288
1288
        self.path = path
1289
1289
        self.code = code
1290
 
        self.msg = msg
 
1290
        self.extra = extra or ''
1291
1291
        full_msg = 'status code %d unexpected' % code
1292
 
        if msg is not None:
1293
 
            full_msg += ': ' + msg
 
1292
        if extra is not None:
 
1293
            full_msg += ': ' + extra
1294
1294
        InvalidHttpResponse.__init__(
1295
1295
            self, path, full_msg)
1296
1296