summaryrefslogtreecommitdiffstats
path: root/Lib/contextlib.py
diff options
context:
space:
mode:
authorZac Hatfield-Dodds <zac.hatfield.dodds@gmail.com>2023-11-10 13:32:36 (GMT)
committerGitHub <noreply@github.com>2023-11-10 13:32:36 (GMT)
commitd61313bdb1eee3e4bb111e0b248ac2dbb48be917 (patch)
treec5cff2f6ee3ab3d8350127adfea5834964c11d47 /Lib/contextlib.py
parent64fea3211d08082236d05c38ee728f922eb7d8ed (diff)
downloadcpython-d61313bdb1eee3e4bb111e0b248ac2dbb48be917.zip
cpython-d61313bdb1eee3e4bb111e0b248ac2dbb48be917.tar.gz
cpython-d61313bdb1eee3e4bb111e0b248ac2dbb48be917.tar.bz2
gh-103791: handle `BaseExceptionGroup` in `contextlib.suppress()` (#111910)
Diffstat (limited to 'Lib/contextlib.py')
-rw-r--r--Lib/contextlib.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/contextlib.py b/Lib/contextlib.py
index 6994690..5b646fa 100644
--- a/Lib/contextlib.py
+++ b/Lib/contextlib.py
@@ -461,7 +461,7 @@ class suppress(AbstractContextManager):
return
if issubclass(exctype, self._exceptions):
return True
- if issubclass(exctype, ExceptionGroup):
+ if issubclass(exctype, BaseExceptionGroup):
match, rest = excinst.split(self._exceptions)
if rest is None:
return True