frontends(xmlui): better handling of missing _xmluiAppend
This commit is contained in:
parent
90440303ea
commit
5768160d2d
1 changed files with 3 additions and 1 deletions
|
|
@ -386,12 +386,14 @@ class XMLUIPanel(XMLUIBase):
|
|||
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')
|
||||
|
|
|
|||
Loading…
Reference in a new issue