mirror of
https://github.com/python/cpython
synced 2024-10-14 09:58:30 +00:00
TaskGroup: Use explicit None check for cancellation error (#114708)
This commit is contained in:
parent
aa3402ad45
commit
29952c86f3
|
@ -132,7 +132,7 @@ async def __aexit__(self, et, exc, tb):
|
|||
|
||||
# Propagate CancelledError if there is one, except if there
|
||||
# are other errors -- those have priority.
|
||||
if propagate_cancellation_error and not self._errors:
|
||||
if propagate_cancellation_error is not None and not self._errors:
|
||||
raise propagate_cancellation_error
|
||||
|
||||
if et is not None and not issubclass(et, exceptions.CancelledError):
|
||||
|
|
Loading…
Reference in a new issue