From d792723caa1894d4ce73fd4fc6ed5bc24d17aaec Mon Sep 17 00:00:00 2001 From: souliane Date: Thu, 24 Oct 2013 08:47:45 +0200 Subject: [PATCH] core (tools): small fix in using imported methods --- src/tools/xml_tools.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/tools/xml_tools.py b/src/tools/xml_tools.py index 1eda1977..659148a9 100644 --- a/src/tools/xml_tools.py +++ b/src/tools/xml_tools.py @@ -17,7 +17,7 @@ # You should have received a copy of the GNU Affero General Public License # along with this program. If not, see . -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 @@ def dataFormResult2AdvancedList(form_ui, form_xml): 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 @@ def dataFormResult2AdvancedList(form_ui, form_xml): name = elt['var'] child_elt = elt.firstChildElement() if child_elt.name != "value": - raise DataError('Was expecting tag') + raise exceptions.DataError('Was expecting tag') value = unicode(child_elt) fields.append(Field(name, value)) items.append(Item(' | '.join((field.value for field in fields if field)), fields))