# HG changeset patch # User Goffi # Date 1482052557 -3600 # Node ID cbf3af02e941034be8d006b3611cb3a2cb79bfb6 # Parent 5e79ba00c1e2fe8f377b277e7cf50527fdec48b9 frontends(xmlui): better handling of missing _xmluiAppend diff -r 5e79ba00c1e2 -r cbf3af02e941 frontends/src/tools/xmlui.py --- a/frontends/src/tools/xmlui.py Tue Dec 13 22:27:49 2016 +0100 +++ b/frontends/src/tools/xmlui.py Sun Dec 18 10:15:57 2016 +0100 @@ -386,12 +386,14 @@ cont = self.widget_factory.createVerticalContainer(_xmlui_parent) self._parseChilds(cont, node, ('widget', 'container')) try: - _xmlui_parent._xmluiAppend(cont) + xmluiAppend = _xmlui_parent._xmluiAppend except (AttributeError, TypeError): # XXX: TypeError is here because pyjamas raise a TypeError instead of an AttributeError if _xmlui_parent is self: self.main_cont = cont else: raise Exception(_("Internal Error, container has not _xmluiAppend method")) + else: + xmluiAppend(cont) elif node.nodeName == 'tab': name = node.getAttribute('name')