]> code.delx.au - pymsnt/blobdiff - src/disco.py
Reordering of switchboard timeouts.
[pymsnt] / src / disco.py
index 3e93a9b017750cc2d298e91edc78ee57970bf081..1c49386d1684e650840714027d9c285125616c44 100644 (file)
@@ -70,7 +70,7 @@ class ServerDiscovery:
                Returns a deferred which will fire with the matching IQ response as it's sole argument. """
                def checkDeferred():
                        if(not d.called):
-                               d.errback()
+                               d.errback(Exception("Timeout"))
                                del self.deferredIqs[(jid, ID)]
 
                jid = el.getAttribute("to")
@@ -130,7 +130,7 @@ class ServerDiscovery:
                LogEvent(INFO, "", "Looking for handler")
 
                for query in el.elements():
-                       xmlns = query.defaultUri
+                       xmlns = query.uri
                        node = query.getAttribute("node")
                        
                        if xmlns.startswith(DISCO) and node:
@@ -232,6 +232,7 @@ class ServerDiscovery:
                error.attributes["type"] = etype
                error.attributes["code"] = str(utils.errorCodeMap[condition])
                cond = error.addElement(condition)
+               cond.attributes["xmlns"] = XMPP_STANZAS
                self.pytrans.send(el)