1.1 --- a/MoinMessage.py Mon Jan 27 19:20:33 2014 +0100
1.2 +++ b/MoinMessage.py Mon Jan 27 21:57:58 2014 +0100
1.3 @@ -151,6 +151,12 @@
1.4 class MoinMessageBadContent(MoinMessageDecodingError):
1.5 pass
1.6
1.7 +class MoinMessageTransferError(MoinMessageError):
1.8 + def __init__(self, code, message, body):
1.9 + MoinMessageError.__init__(self, message)
1.10 + self.code = code
1.11 + self.body = body
1.12 +
1.13 class GPG:
1.14
1.15 "A wrapper around the gpg command using a particular configuration."
1.16 @@ -521,7 +527,7 @@
1.17 resp = req.getresponse()
1.18
1.19 if resp.status >= 400:
1.20 - raise MoinMessageError, "Message sending failed (%s): %s" % (resp.status, resp.read())
1.21 + raise MoinMessageTransferError(resp.status, "Message sending failed (%s)" % resp.status, resp.read())
1.22
1.23 return resp
1.24