mirror of
https://github.com/python/cpython.git
synced 2025-01-20 15:34:52 +08:00
TaskGroup: Use explicit None check for cancellation error (#114708)
This commit is contained in:
parent
aa3402ad45
commit
29952c86f3
@ -132,7 +132,7 @@ class TaskGroup:
|
||||
|
||||
# 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 New Issue
Block a user