From 7ce1c6fb579a01bb184224a10019039fde9c8eaf Mon Sep 17 00:00:00 2001 From: Yury Selivanov Date: Sun, 11 Jun 2017 13:49:18 +0000 Subject: bpo-30508: Don't log exceptions if Task/Future "cancel()" method called (#2050) --- Lib/asyncio/futures.py | 1 + 1 file changed, 1 insertion(+) (limited to 'Lib/asyncio/futures.py') diff --git a/Lib/asyncio/futures.py b/Lib/asyncio/futures.py index 39721eaf00..215f72d191 100644 --- a/Lib/asyncio/futures.py +++ b/Lib/asyncio/futures.py @@ -107,6 +107,7 @@ class Future: change the future's state to cancelled, schedule the callbacks and return True. """ + self._log_traceback = False if self._state != _PENDING: return False self._state = _CANCELLED -- cgit v1.2.1