changeset 1608:05274b27e90e

frontends (xmlui): fixed widget closing on submit
author Goffi <goffi@goffi.org>
date Mon, 16 Nov 2015 08:57:02 +0100
parents 4741e2f5eed2
children 66f0e877625b
files frontends/src/tools/xmlui.py src/stdui/ui_profile_manager.py
diffstat 2 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/frontends/src/tools/xmlui.py	Mon Nov 16 00:24:49 2015 +0100
+++ b/frontends/src/tools/xmlui.py	Mon Nov 16 08:57:02 2015 +0100
@@ -189,7 +189,6 @@
     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 @@
         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:
--- a/src/stdui/ui_profile_manager.py	Mon Nov 16 00:24:49 2015 +0100
+++ b/src/stdui/ui_profile_manager.py	Mon Nov 16 08:57:02 2015 +0100
@@ -91,7 +91,7 @@
         @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')]