diff options
author | Charles Harris <charlesr.harris@gmail.com> | 2015-06-27 14:48:24 -0400 |
---|---|---|
committer | Charles Harris <charlesr.harris@gmail.com> | 2015-06-27 14:48:24 -0400 |
commit | 56678fe56dce97871bb49febf0b2c0206541eada (patch) | |
tree | 90172726558a4f262dafe41f3d583df46fc4c82f /numpy/lib/utils.py | |
parent | 567a44d276e74d0a570be8fa6bb8a7b4345a7de3 (diff) | |
parent | 35def25c65fe6c8576dfc0e246b67784b8fcb8e9 (diff) | |
download | numpy-56678fe56dce97871bb49febf0b2c0206541eada.tar.gz |
Merge pull request #5953 from yarikoptic/bf/guard-getmembers
BF: do not crash lookfor if inspection fails - catch any Exception
Diffstat (limited to 'numpy/lib/utils.py')
-rw-r--r-- | numpy/lib/utils.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/numpy/lib/utils.py b/numpy/lib/utils.py index 5a92cc316..1c95099c9 100644 --- a/numpy/lib/utils.py +++ b/numpy/lib/utils.py @@ -976,7 +976,7 @@ def _getmembers(item): import inspect try: members = inspect.getmembers(item) - except AttributeError: + except Exception: members = [(x, getattr(item, x)) for x in dir(item) if hasattr(item, x)] return members |