Skip to content

Commit 0be62d4

Browse files
jacobtylerwallsPierre-Sassoulas
authored andcommitted
Fixed a crash in the gi brain
1 parent 6b1bf6c commit 0be62d4

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

ChangeLog

+4
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@ Release date: TBA
1616

1717
Closes PyCQA/pylint#6221
1818

19+
* Fixed a crash in the ``gi`` brain.
20+
21+
Closes PyCQA/pylint#6371
22+
1923

2024
What's New in astroid 2.11.2?
2125
=============================

astroid/brain/brain_gi.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,9 @@ def _gi_build_stub(parent):
7474

7575
try:
7676
obj = getattr(parent, name)
77-
except AttributeError:
77+
except Exception: # pylint: disable=broad-except
78+
# gi.module.IntrospectionModule.__getattr__() can raise all kinds of things
79+
# like ValueError, TypeError, NotImplementedError, RepositoryError, etc
7880
continue
7981

8082
if inspect.isclass(obj):

0 commit comments

Comments
 (0)