summaryrefslogtreecommitdiffstats
path: root/Lib/asyncio/futures.py
diff options
context:
space:
mode:
authorYury Selivanov <yury@magic.io>2017-06-11 13:49:18 (GMT)
committerGitHub <noreply@github.com>2017-06-11 13:49:18 (GMT)
commit7ce1c6fb579a01bb184224a10019039fde9c8eaf (patch)
treecfae34038438eb189d445bcd6391c9c19607baf7 /Lib/asyncio/futures.py
parent36ff451ebae41f09560bff582c95946474d898f8 (diff)
downloadcpython-7ce1c6fb579a01bb184224a10019039fde9c8eaf.zip
cpython-7ce1c6fb579a01bb184224a10019039fde9c8eaf.tar.gz
cpython-7ce1c6fb579a01bb184224a10019039fde9c8eaf.tar.bz2
bpo-30508: Don't log exceptions if Task/Future "cancel()" method called (#2050)
Diffstat (limited to 'Lib/asyncio/futures.py')
-rw-r--r--Lib/asyncio/futures.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/Lib/asyncio/futures.py b/Lib/asyncio/futures.py
index 39721ea..215f72d 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