Skip to content

Commit cd8df0d

Browse files
Fixed a crash in the gi brain
1 parent 6376a10 commit cd8df0d

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

ChangeLog

Lines changed: 4 additions & 0 deletions
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

Lines changed: 3 additions & 1 deletion
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)