From 5226e6ef6b72b0f5f55363e31db68c1c03b7f102 Mon Sep 17 00:00:00 2001 From: Goffi Date: Mon, 16 Nov 2015 08:57:02 +0100 Subject: [PATCH] frontends (xmlui): fixed widget closing on submit --- frontends/src/tools/xmlui.py | 2 +- src/stdui/ui_profile_manager.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/frontends/src/tools/xmlui.py b/frontends/src/tools/xmlui.py index db659c18..c6e3d84c 100644 --- a/frontends/src/tools/xmlui.py +++ b/frontends/src/tools/xmlui.py @@ -189,7 +189,6 @@ class Dialog(object): def _xmluiSubmit(self, data): if self._xmlui_parent.submit_id is None: log.debug(_("Nothing to submit")) - self._xmluiClose() else: self._xmlui_parent.submit(data) @@ -282,6 +281,7 @@ class XMLUIBase(object): return None def submit(self, data): + self._xmluiClose() if self.submit_id is None: raise ValueError("Can't submit is self.submit_id is not set") if "session_id" in data: diff --git a/src/stdui/ui_profile_manager.py b/src/stdui/ui_profile_manager.py index 3ffe74a1..67c44018 100644 --- a/src/stdui/ui_profile_manager.py +++ b/src/stdui/ui_profile_manager.py @@ -91,7 +91,7 @@ class ProfileManager(object): @param profile: %(doc_profile)s @return: deferred dict """ - assert(profile in self.profile_ciphers) + assert profile in self.profile_ciphers try: profile_password = data[xml_tools.formEscape('profile_password')]