changeset 3114:6cd9250ca37d

Apply patch from Tryton client changeset 5447 :Process exception during the callback
author Luis Falcon <falcon@gnu.org>
date Sat, 22 Dec 2018 19:18:39 +0000
parents 38459dbd7a1b
children 726edb78e8cb
files gnuhealth-client/tryton/common/common.py
diffstat 1 files changed, 6 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/gnuhealth-client/tryton/common/common.py
+++ b/gnuhealth-client/tryton/common/common.py
@@ -1175,17 +1175,15 @@
     def process(self):
         if self.parent and self.parent.get_window():
             self.parent.get_window().set_cursor(None)
-        if self.exception:
-            if self.process_exception_p:
-                def rpc_execute(*args):
-                    return RPCProgress('execute',
-                        args).run(self.process_exception_p, self.callback)
-                return process_exception(self.exception, *self.args,
-                    rpc_execute=rpc_execute)
 
         def return_():
             if self.exception:
-                raise self.exception
+                if self.process_exception_p:
+                    def rpc_execute(*args):
+                        return RPCProgress('execute',
+                            args).run(self.process_exception_p, self.callback)
+                    return process_exception(self.exception, *self.args,
+                        rpc_execute=rpc_execute)
             else:
                 return self.res