summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYury Selivanov <yselivanov@sprymix.com>2015-08-02 20:49:56 (GMT)
committerYury Selivanov <yselivanov@sprymix.com>2015-08-02 20:49:56 (GMT)
commitaa0043b4127209005ad1188d7c69dd5e8adf4c48 (patch)
treea4aa92d25d99f25b24ee2554725568d605d3bb75
parent38768b23ae81f74ee98bb5e8d097551ed29624b5 (diff)
parentc3fcb9696cd1c1122329ef78b7c316b4249a848b (diff)
downloadcpython-aa0043b4127209005ad1188d7c69dd5e8adf4c48.zip
cpython-aa0043b4127209005ad1188d7c69dd5e8adf4c48.tar.gz
cpython-aa0043b4127209005ad1188d7c69dd5e8adf4c48.tar.bz2
Merge 3.5
-rw-r--r--Lib/asyncio/tasks.py5
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,