diff options
| author | Jacob Walls <jacobtylerwalls@gmail.com> | 2022-04-17 18:54:00 -0400 |
|---|---|---|
| committer | Pierre Sassoulas <pierre.sassoulas@gmail.com> | 2022-04-19 22:24:09 +0200 |
| commit | 0be62d4f5e0fc9f20e8e389b2d099f0932f0d984 (patch) | |
| tree | 9400866011912d49ce9a8ebf1699cd5e20f19548 | |
| parent | 6b1bf6caeaa52dfbb12fd7a1d15bb3fc0813a749 (diff) | |
| download | astroid-git-0be62d4f5e0fc9f20e8e389b2d099f0932f0d984.tar.gz | |
Fixed a crash in the `gi` brain
| -rw-r--r-- | ChangeLog | 4 | ||||
| -rw-r--r-- | astroid/brain/brain_gi.py | 4 |
2 files changed, 7 insertions, 1 deletions
@@ -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): |
