# HG changeset patch # User souliane # Date 1382597265 -7200 # Node ID 969562c4761b79db5ad656406f5076f1bcf83317 # Parent 75e4f5e2cc65f63fb6e544e357a4cd07b14d3182 core (tools): small fix in using imported methods diff -r 75e4f5e2cc65 -r 969562c4761b src/tools/xml_tools.py --- 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 . -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 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))