# HG changeset patch # User Ralph Meijer # Date 1233329253 0 # Node ID 2a0a6a67177630c419ab3fc137af983c3f4bae0f # Parent 7f3ffb7a1a9ea8053c9040ff6796e7154ed6d110 Fix error reporting for older Python versions. diff -r 7f3ffb7a1a9e -r 2a0a6a671776 idavoll/gateway.py --- a/idavoll/gateway.py Fri Jan 30 14:35:05 2009 +0000 +++ b/idavoll/gateway.py Fri Jan 30 15:27:33 2009 +0000 @@ -68,7 +68,7 @@ try: service = JID(entity) except Exception, e: - raise XMPPURIParseError("Invalid JID: %s" % e.message) + raise XMPPURIParseError("Invalid JID: %s" % e) params = cgi.parse_qs(query) @@ -201,7 +201,7 @@ def trapXMPPURIParseError(failure): failure.trap(XMPPURIParseError) return http.StatusResponse(responsecode.BAD_REQUEST, - "Malformed XMPP URI: %s" % failure.value.message) + "Malformed XMPP URI: %s" % failure.value) data = [] d = readStream(request.stream, data.append) @@ -291,7 +291,7 @@ def trapXMPPURIParseError(failure): failure.trap(XMPPURIParseError) return http.StatusResponse(responsecode.BAD_REQUEST, - "Malformed XMPP URI: %s" % failure.value.message) + "Malformed XMPP URI: %s" % failure.value) self.checkMediaType(request) d = self.parseXMLPayload(request.stream) @@ -601,7 +601,7 @@ def trapXMPPURIParseError(failure): failure.trap(XMPPURIParseError) return http.StatusResponse(responsecode.BAD_REQUEST, - "Malformed XMPP URI: %s" % failure.value.message) + "Malformed XMPP URI: %s" % failure.value) d = readStream(request.stream, storeParams) d.addCallback(gotRequest)