From: Yury Selivanov Date: Sun, 2 Aug 2015 20:49:31 +0000 (-0400) Subject: Revert da29a94367b2 X-Git-Tag: v3.5.0rc1~49^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=4c0a09a0c96d3027ccb4e395ac9bd9dae5db33f1;p=thirdparty%2FPython%2Fcpython.git Revert da29a94367b2 --- diff --git a/Lib/asyncio/tasks.py b/Lib/asyncio/tasks.py index 45c6d1b0e039..9bfc1cf81479 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,