diff options
| author | Yury Selivanov <yselivanov@sprymix.com> | 2015-08-02 16:49:44 -0400 |
|---|---|---|
| committer | Yury Selivanov <yselivanov@sprymix.com> | 2015-08-02 16:49:44 -0400 |
| commit | c3fcb9696cd1c1122329ef78b7c316b4249a848b (patch) | |
| tree | 8c9c0856163cf80abab3f852d7005af833119eab | |
| parent | 60e3f367a4fea840df2bb4cd85e007768433e0ad (diff) | |
| parent | 4c0a09a0c96d3027ccb4e395ac9bd9dae5db33f1 (diff) | |
| download | cpython-git-c3fcb9696cd1c1122329ef78b7c316b4249a848b.tar.gz | |
Merge 3.4
| -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 45c6d1b0e0..9bfc1cf814 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, |
