diff src/tools/xml_tools.py @ 876:65bf1bc70f6b

tools, plugin XEP-0077: small fixes
author souliane <souliane@mailoo.org>
date Tue, 25 Feb 2014 22:58:42 +0100
parents 3ee2ec7ec010
children cad8e52bb2e6
line wrap: on
line diff
--- a/src/tools/xml_tools.py	Tue Feb 25 18:47:15 2014 +0100
+++ b/src/tools/xml_tools.py	Tue Feb 25 22:58:42 2014 +0100
@@ -331,7 +331,7 @@
     """" Used by AdvancedListContainer """
     type = 'header'
 
-    def __init__(self, parent, name=None, Label=None, description=None):
+    def __init__(self, parent, name=None, label=None, description=None):
         """
         @param parent: AdvancedListContainer instance
         @param name: name of the container
@@ -342,11 +342,11 @@
         assert(isinstance(parent, AdvancedListContainer))
         super(HeaderElement, self).__init__(parent.xmlui, parent)
         if name:
-            field_elt.setAttribute('name', name)
+            self.elem.setAttribute('name', name)
         if label:
-            field_elt.setAttribute('label', label)
+            self.elem.setAttribute('label', label)
         if description:
-            field_elt.setAttribute('description', description)
+            self.elem.setAttribute('description', description)
 
 
 class Container(Element):
@@ -422,7 +422,7 @@
         """
         assert selectable in ('no', 'single')
         if not items and columns is None:
-            raise DataError(_("either items or columns need do be filled"))
+            raise exceptions.DataError(_("either items or columns need do be filled"))
         if headers is None:
             headers = []
         if items is None: