summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYury Selivanov <yselivanov@sprymix.com>2015-08-02 14:24:49 (GMT)
committerYury Selivanov <yselivanov@sprymix.com>2015-08-02 14:24:49 (GMT)
commit32ba405ce5ad9ee7c18c96a264c5db42817f7cb1 (patch)
treedeec6ae5215874288e3c24ef6c28b4244297995b
parent75ead2b578a40611192c34a185c9ecf583f3a629 (diff)
parent6b3f29ca8f97ac952d61c34285ff716eb2f37471 (diff)
downloadcpython-32ba405ce5ad9ee7c18c96a264c5db42817f7cb1.zip
cpython-32ba405ce5ad9ee7c18c96a264c5db42817f7cb1.tar.gz
cpython-32ba405ce5ad9ee7c18c96a264c5db42817f7cb1.tar.bz2
Merge 3.4
-rw-r--r--Lib/asyncio/tasks.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/Lib/asyncio/tasks.py b/Lib/asyncio/tasks.py
index 9bfc1cf..45c6d1b 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,