diff idavoll/idavoll.py @ 101:b75fcc554358

Added support for disco info meta data.
author Ralph Meijer <ralphm@ik.nu>
date Sun, 02 Jan 2005 20:10:02 +0000
parents cf918d581da5
children f4d725a94202
line wrap: on
line diff
--- a/idavoll/idavoll.py	Sun Jan 02 20:09:31 2005 +0000
+++ b/idavoll/idavoll.py	Sun Jan 02 20:10:02 2005 +0000
@@ -69,11 +69,18 @@
         else:
             iq.swapAttributeValues("to", "from")
             iq["type"] = "result"
-            iq.query.children = info
+            for item in info:
+                #domish.Element.addChild should probably do this for all
+                # subclasses of Element
+                item.parent = iq.query
+
+                iq.query.addChild(item)
 
         return iq
 
-    def _error(self, results, iq):
+    def _error(self, result, iq):
+        print "Got error on index %d:" % result.value[1]
+        result.value[0].printBriefTraceback()
         return xmpp_error.error_from_iq(iq, 'internal-server-error')
 
     def onDiscoItems(self, iq):