[Fix] 修复Promise抛出单个异常时get无法获取到正确的异常的错误

This commit is contained in:
nanoric 2018-10-10 22:09:27 -04:00
parent 6e71c59c06
commit ab116d8f97

View File

@ -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)))