diff --git a/ChangeLog b/ChangeLog index 10a7e90857..e91bcfcccf 100644 --- a/ChangeLog +++ b/ChangeLog @@ -16,6 +16,10 @@ Release date: TBA Closes PyCQA/pylint#6221 +* Fixed a crash in the ``gi`` brain. + + Closes PyCQA/pylint#6371 + What's New in astroid 2.11.2? ============================= diff --git a/astroid/brain/brain_gi.py b/astroid/brain/brain_gi.py index 6c61171b6f..5728e2dd89 100644 --- a/astroid/brain/brain_gi.py +++ b/astroid/brain/brain_gi.py @@ -74,7 +74,9 @@ def _gi_build_stub(parent): try: obj = getattr(parent, name) - except AttributeError: + except Exception: # pylint: disable=broad-except + # gi.module.IntrospectionModule.__getattr__() can raise all kinds of things + # like ValueError, TypeError, NotImplementedError, RepositoryError, etc continue if inspect.isclass(obj):