diff options
author | Zac Hatfield-Dodds <zac.hatfield.dodds@gmail.com> | 2023-11-10 13:32:36 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-11-10 13:32:36 (GMT) |
commit | d61313bdb1eee3e4bb111e0b248ac2dbb48be917 (patch) | |
tree | c5cff2f6ee3ab3d8350127adfea5834964c11d47 /Lib/contextlib.py | |
parent | 64fea3211d08082236d05c38ee728f922eb7d8ed (diff) | |
download | cpython-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.py | 2 |
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 |