diff idavoll/gateway.py @ 210:2a0a6a671776

Fix error reporting for older Python versions.
author Ralph Meijer <ralphm@ik.nu>
date Fri, 30 Jan 2009 15:27:33 +0000
parents 7f3ffb7a1a9e
children bfc198af5d27
line wrap: on
line diff
--- 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)