summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacob Walls <jacobtylerwalls@gmail.com>2022-04-17 18:54:00 -0400
committerPierre Sassoulas <pierre.sassoulas@gmail.com>2022-04-19 22:24:09 +0200
commit0be62d4f5e0fc9f20e8e389b2d099f0932f0d984 (patch)
tree9400866011912d49ce9a8ebf1699cd5e20f19548
parent6b1bf6caeaa52dfbb12fd7a1d15bb3fc0813a749 (diff)
downloadastroid-git-0be62d4f5e0fc9f20e8e389b2d099f0932f0d984.tar.gz
Fixed a crash in the `gi` brain
-rw-r--r--ChangeLog4
-rw-r--r--astroid/brain/brain_gi.py4
2 files changed, 7 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 10a7e908..e91bcfcc 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 6c61171b..5728e2dd 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):