[Fix] 修复Promise抛出单个异常时get无法获取到正确的异常的错误
This commit is contained in:
parent
6e71c59c06
commit
ab116d8f97
@ -33,6 +33,6 @@ class Promise(object):
|
||||
|
||||
def set_exception(self, valueOrType, val=None, tb=None):
|
||||
if val is None:
|
||||
self._queue.put((PromiseResultType.Exception, val))
|
||||
self._queue.put((PromiseResultType.Exception, valueOrType))
|
||||
else:
|
||||
self._queue.put((PromiseResultType.Traceback, (valueOrType, val, tb)))
|
||||
|
Loading…
Reference in New Issue
Block a user