diff options
author | Yury Selivanov <yselivanov@sprymix.com> | 2015-08-02 20:49:44 (GMT) |
---|---|---|
committer | Yury Selivanov <yselivanov@sprymix.com> | 2015-08-02 20:49:44 (GMT) |
commit | c3fcb9696cd1c1122329ef78b7c316b4249a848b (patch) | |
tree | 8c9c0856163cf80abab3f852d7005af833119eab /Lib | |
parent | 60e3f367a4fea840df2bb4cd85e007768433e0ad (diff) | |
parent | 4c0a09a0c96d3027ccb4e395ac9bd9dae5db33f1 (diff) | |
download | cpython-c3fcb9696cd1c1122329ef78b7c316b4249a848b.zip cpython-c3fcb9696cd1c1122329ef78b7c316b4249a848b.tar.gz cpython-c3fcb9696cd1c1122329ef78b7c316b4249a848b.tar.bz2 |
Merge 3.4
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/asyncio/tasks.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Lib/asyncio/tasks.py b/Lib/asyncio/tasks.py index 45c6d1b..9bfc1cf 100644 --- a/Lib/asyncio/tasks.py +++ b/Lib/asyncio/tasks.py @@ -249,8 +249,9 @@ class Task(futures.Future): result._blocking = False result.add_done_callback(self._wakeup) self._fut_waiter = result - if self._must_cancel and self._fut_waiter.cancel(): - self._must_cancel = False + if self._must_cancel: + if self._fut_waiter.cancel(): + self._must_cancel = False else: self._loop.call_soon( self._step, None, |