Process exception during the callback
As process exception may raise an exception, it should be run in the callback to let the caller catch it. Otherwise it is raised in the thread and never catch. issue6907 review42811003
This commit is contained in:
1 parent
a911475c74
commit
562b34ad76
1 file changed
+6
-8
@@ -1191,17 +1191,15 @@ class RPCProgress(object):
|
||||
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
|
||||
|
||||
|
||||
Reference in new issue
Block a user