From: Yury Selivanov Date: Sun, 2 Aug 2015 14:24:34 +0000 (-0400) Subject: asyncio: Fix code style X-Git-Tag: v3.5.0rc1~51^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=6b3f29ca8f97ac952d61c34285ff716eb2f37471;p=thirdparty%2FPython%2Fcpython.git asyncio: Fix code style --- diff --git a/Lib/asyncio/tasks.py b/Lib/asyncio/tasks.py index 9bfc1cf81479..45c6d1b0e039 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,