core (tools): small fix in using imported methods
This commit is contained in:
parent
34947f8840
commit
d792723caa
1 changed files with 3 additions and 3 deletions
|
|
@ -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 @@ 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 <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))
|
||||
|
|
|
|||
Loading…
Reference in a new issue