diff options
author | Victor Stinner <victor.stinner@gmail.com> | 2015-01-29 10:00:08 +0100 |
---|---|---|
committer | Victor Stinner <victor.stinner@gmail.com> | 2015-01-29 10:00:08 +0100 |
commit | 57c9c810e07a62f3d358d9980fe99e11b0feaaf4 (patch) | |
tree | 6c6a725065814d441eb6c2f09c07628904d2e2cb /asyncio | |
parent | 4bbfa97905d6bb79b33d90979c9ae35ecf7bd8f5 (diff) | |
download | trollius-57c9c810e07a62f3d358d9980fe99e11b0feaaf4.tar.gz |
Cleanup gather(): use cancelled() method instead of using private Future
attribute
Diffstat (limited to 'asyncio')
-rw-r--r-- | asyncio/tasks.py | 2 |
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) |