diff options
author | Yury Selivanov <yselivanov@sprymix.com> | 2015-08-02 10:25:06 -0400 |
---|---|---|
committer | Yury Selivanov <yselivanov@sprymix.com> | 2015-08-02 10:25:06 -0400 |
commit | 68669d57d68c99cb96ff34b43ca6e3af91df9112 (patch) | |
tree | 79fd8c461fea83a501c1ec3f3cd6338410e2b7a3 | |
parent | 96860ee8d08d8023ae913e43c059fca740dad9fb (diff) | |
parent | 32ba405ce5ad9ee7c18c96a264c5db42817f7cb1 (diff) | |
download | cpython-git-68669d57d68c99cb96ff34b43ca6e3af91df9112.tar.gz |
Merge 3.5
-rw-r--r-- | Lib/asyncio/tasks.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/Lib/asyncio/tasks.py b/Lib/asyncio/tasks.py index 9bfc1cf814..45c6d1b0e0 100644 --- a/Lib/asyncio/tasks.py +++ b/Lib/asyncio/tasks.py @@ -249,9 +249,8 @@ class Task(futures.Future): result._blocking = False result.add_done_callback(self._wakeup) self._fut_waiter = result - if self._must_cancel: - if self._fut_waiter.cancel(): - self._must_cancel = False + if self._must_cancel and self._fut_waiter.cancel(): + self._must_cancel = False else: self._loop.call_soon( self._step, None, |