From 35def25c65fe6c8576dfc0e246b67784b8fcb8e9 Mon Sep 17 00:00:00 2001 From: Yaroslav Halchenko Date: Mon, 8 Jun 2015 18:36:32 -0400 Subject: BF: do not crash lookfor if inspection fails - catch any Exception --- numpy/lib/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'numpy/lib/utils.py') diff --git a/numpy/lib/utils.py b/numpy/lib/utils.py index 519d0e9b9..8ada20ba6 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 -- cgit v1.2.1