From 936843bb673400a6501d369988140cc760a0bf75 Mon Sep 17 00:00:00 2001 From: Goffi Date: Wed, 8 Nov 2017 08:31:21 +0100 Subject: [PATCH] frontends (xmlui): fixed crash on advanced_list use: the data variable was set to None but kept for other nodes, resulting in a crash in a later test where a dict was expected. --- frontends/src/tools/xmlui.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frontends/src/tools/xmlui.py b/frontends/src/tools/xmlui.py index c3e1816e..8b59de10 100644 --- a/frontends/src/tools/xmlui.py +++ b/frontends/src/tools/xmlui.py @@ -377,9 +377,9 @@ class XMLUIPanel(XMLUIBase): @param wanted: list of tag names that can be present in the childs to be SàT XMLUI compliant @param data(None, dict): additionnal data which are needed in some cases """ - if data is None: - data = {} for node in current_node.childNodes: + if data is None: + data = {} if wanted and not node.nodeName in wanted: raise InvalidXMLUI('Unexpected node: [%s]' % node.nodeName)