diff options
author | Alexandr Shadchin <alexandr.shadchin@gmail.com> | 2016-12-08 17:15:52 +0500 |
---|---|---|
committer | Alexandr Shadchin <alexandr.shadchin@gmail.com> | 2016-12-09 16:22:24 +0500 |
commit | 15f52f530c4dc1af69e93aae60d81c2008101639 (patch) | |
tree | 6d445533dc4477f9cd5f27469addf9f9edef74ed /numpy/lib/utils.py | |
parent | 58394d6c27b3ff03f70b07580036a1b96c7a4608 (diff) | |
download | numpy-15f52f530c4dc1af69e93aae60d81c2008101639.tar.gz |
MAINT: Other cleanup Python < 2.7 and Python3 < 3.4
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): |