Removed code that sets f._result
This stopped working from Python 3.6 onwards, as the Future implementation is now written in C.
This commit is contained in:
parent
1d5b186ae9
commit
7ecd9cbb4e
|
@ -437,17 +437,12 @@ class _AsyncioApi(object):
|
|||
"""
|
||||
callback or errback may be None, but at least one must be
|
||||
non-None.
|
||||
|
||||
XXX beware the "f._result" hack to get "chainable-callback" type
|
||||
behavior.
|
||||
"""
|
||||
def done(f):
|
||||
try:
|
||||
res = f.result()
|
||||
if callback:
|
||||
x = callback(res)
|
||||
if x is not None:
|
||||
f._result = x
|
||||
callback(res)
|
||||
except Exception:
|
||||
if errback:
|
||||
errback(create_failure())
|
||||
|
|
Loading…
Reference in New Issue