diff tools/xml_tools.py @ 39:2e3411a6baad

Wix: external server management in gateways manager, SàT: bug fixes in gateway management - SàT: from twisted.words.protocols.jabber.error module imported as jab_error to avoir name colision with error log method - XEP_0100 plugin: added errback for disco info - XEP_0077 plugin: registration callback now look for "x" element (data form: see XEP-0004), and send an error message if it can't find it. - Wix: added fields for browsing external server gateways
author Goffi <goffi@goffi.org>
date Thu, 17 Dec 2009 17:29:02 +1100
parents a61beb21d16d
children a5b5fb5fc9fd
line wrap: on
line diff
--- a/tools/xml_tools.py	Thu Dec 17 13:13:13 2009 +1100
+++ b/tools/xml_tools.py	Thu Dec 17 17:29:02 2009 +1100
@@ -52,17 +52,16 @@
                 __field_type = "password"
             else:
                 error (u"FIXME FIXME FIXME: Type [%s] is not managed yet by SàT" % field.fieldType)
-                __field_type = "string_field"
+                __field_type = "string"
             
             elem = doc.createElement('elem')
             elem.setAttribute('name', field.var)
             elem.setAttribute('type', __field_type)
-            elem.setAttribute('label', field.label)
+            elem.setAttribute('label', field.label or "")
             if field.value:
                 text = doc.createTextNode(field.value)
                 elem.appendChild(text)
             top_element.appendChild(elem)
-            
         result = doc.toxml()
         doc.unlink()
         return result