summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2015-01-29 10:00:08 +0100
committerVictor Stinner <victor.stinner@gmail.com>2015-01-29 10:00:08 +0100
commit57c9c810e07a62f3d358d9980fe99e11b0feaaf4 (patch)
tree6c6a725065814d441eb6c2f09c07628904d2e2cb
parent4bbfa97905d6bb79b33d90979c9ae35ecf7bd8f5 (diff)
downloadtrollius-57c9c810e07a62f3d358d9980fe99e11b0feaaf4.tar.gz
Cleanup gather(): use cancelled() method instead of using private Future
attribute
-rw-r--r--asyncio/tasks.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/asyncio/tasks.py b/asyncio/tasks.py
index 63412a9..4f19a25 100644
--- a/asyncio/tasks.py
+++ b/asyncio/tasks.py
@@ -592,7 +592,7 @@ def gather(*coros_or_futures, loop=None, return_exceptions=False):
fut.exception()
return
- if fut._state == futures._CANCELLED:
+ if fut.cancelled():
res = futures.CancelledError()
if not return_exceptions:
outer.set_exception(res)