]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
asyncio: Fix code style
authorYury Selivanov <yselivanov@sprymix.com>
Sun, 2 Aug 2015 14:24:34 +0000 (10:24 -0400)
committerYury Selivanov <yselivanov@sprymix.com>
Sun, 2 Aug 2015 14:24:34 +0000 (10:24 -0400)
Lib/asyncio/tasks.py

index 9bfc1cf81479c68b271ab81a1812436e9201401f..45c6d1b0e03990a34c2d03620aed3d268c2b935e 100644 (file)
@@ -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,