Skip to content

Commit 29952c8

Browse files
authored
TaskGroup: Use explicit None check for cancellation error (#114708)
1 parent aa3402a commit 29952c8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Lib/asyncio/taskgroups.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ async def __aexit__(self, et, exc, tb):
132132

133133
# Propagate CancelledError if there is one, except if there
134134
# are other errors -- those have priority.
135-
if propagate_cancellation_error and not self._errors:
135+
if propagate_cancellation_error is not None and not self._errors:
136136
raise propagate_cancellation_error
137137

138138
if et is not None and not issubclass(et, exceptions.CancelledError):

0 commit comments

Comments
 (0)