diff options
Diffstat (limited to 'numpy/lib/utils.py')
-rw-r--r-- | numpy/lib/utils.py | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/numpy/lib/utils.py b/numpy/lib/utils.py index 97b93cace..5c364268c 100644 --- a/numpy/lib/utils.py +++ b/numpy/lib/utils.py @@ -917,13 +917,6 @@ def _lookfor_generate_cache(module, import_modules, regenerate): continue try: - # Catch SystemExit, too - base_exc = BaseException - except NameError: - # Python 2.4 doesn't have BaseException - base_exc = Exception - - try: old_stdout = sys.stdout old_stderr = sys.stderr try: @@ -933,7 +926,8 @@ def _lookfor_generate_cache(module, import_modules, regenerate): finally: sys.stdout = old_stdout sys.stderr = old_stderr - except base_exc: + # Catch SystemExit, too + except BaseException: continue for n, v in _getmembers(item): |