diff src/tools/xml_tools.py @ 1500:c7c872a40e56

tools (xml_tools): keeps data form result headers sorted
author souliane <souliane@mailoo.org>
date Wed, 26 Aug 2015 12:24:38 +0200
parents adc72c39f032
children a2e4b976e707
line wrap: on
line diff
--- a/src/tools/xml_tools.py	Wed Aug 26 12:23:55 2015 +0200
+++ b/src/tools/xml_tools.py	Wed Aug 26 12:24:38 2015 +0200
@@ -27,6 +27,7 @@
 from twisted.words.xish import domish
 from twisted.words.protocols.jabber import jid
 from sat.core import exceptions
+from collections import OrderedDict
 
 
 """This library help manage XML used in SàT (parameters, registration, etc)"""
@@ -141,7 +142,7 @@
     @param form_xml (domish.Element): element of the data form
     @return: the completed XMLUI instance
     """
-    headers = {}
+    headers = OrderedDict()
     try:
         reported_elt = form_xml.elements('jabber:x:data', 'reported').next()
     except StopIteration: