summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYury Selivanov <yselivanov@sprymix.com>2015-08-02 10:23:11 -0400
committerYury Selivanov <yselivanov@sprymix.com>2015-08-02 10:23:11 -0400
commit4851618b6b154272e79bdc1b5f63b4887e12d8e9 (patch)
tree297bafc5ab796f64aadf432524615148899b6d4e
parent4f45ac71aa8e1aa97007c6da4f12f7c159b24a36 (diff)
downloadtrollius-git-4851618b6b154272e79bdc1b5f63b4887e12d8e9.tar.gz
tasks: Fix code style
-rw-r--r--asyncio/tasks.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/asyncio/tasks.py b/asyncio/tasks.py
index 9bfc1cf..45c6d1b 100644
--- a/asyncio/tasks.py
+++ b/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,