Mercurial > libervia-backend
changeset 2093:cbf3af02e941
frontends(xmlui): better handling of missing _xmluiAppend
author | Goffi <goffi@goffi.org> |
---|---|
date | Sun, 18 Dec 2016 10:15:57 +0100 (2016-12-18) |
parents | 5e79ba00c1e2 |
children | 438a49dbfe87 |
files | frontends/src/tools/xmlui.py |
diffstat | 1 files changed, 3 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- 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')