changeset 684:969562c4761b

core (tools): small fix in using imported methods
author souliane <souliane@mailoo.org>
date Thu, 24 Oct 2013 08:47:45 +0200
parents 75e4f5e2cc65
children 0b9bd47dffcd
files src/tools/xml_tools.py
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/tools/xml_tools.py	Wed Oct 23 12:45:13 2013 +0200
+++ b/src/tools/xml_tools.py	Thu Oct 24 08:47:45 2013 +0200
@@ -17,7 +17,7 @@
 # You should have received a copy of the GNU Affero General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-from logging import debug, info, error
+from logging import debug, info, error, warning
 from xml.dom import minidom
 from wokkel import data_form
 from twisted.words.xish import domish
@@ -84,7 +84,7 @@
         headers.append(Header(name, label))
 
     if not headers:
-        raise DataError("No reported fields (see XEP-0004 §3.4)")
+        raise exceptions.DataError("No reported fields (see XEP-0004 §3.4)")
 
     item_elts = form_xml.elements('jabber:x:data', 'item')
 
@@ -97,7 +97,7 @@
             name = elt['var']
             child_elt = elt.firstChildElement()
             if child_elt.name != "value":
-                raise DataError('Was expecting <value> tag')
+                raise exceptions.DataError('Was expecting <value> tag')
             value = unicode(child_elt)
             fields.append(Field(name, value))
         items.append(Item(' | '.join((field.value for field in fields if field)), fields))