mirror of
https://github.com/python/cpython.git
synced 2025-08-31 14:07:50 +00:00
bpo-30508: Don't log exceptions if Task/Future "cancel()" method called (#2050)
This commit is contained in:
parent
36ff451eba
commit
7ce1c6fb57
6 changed files with 49 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue