diff options
author | Eric Wieser <wieser.eric@gmail.com> | 2020-01-05 21:16:11 +0000 |
---|---|---|
committer | Eric Wieser <wieser.eric@gmail.com> | 2020-01-05 21:22:53 +0000 |
commit | da0497fdf35a7bf851f3625b0df07cde950f5f49 (patch) | |
tree | 2bfd303e0c20edbbc2b0523b852f6f9710e4dd92 /numpy/distutils/fcompiler/compaq.py | |
parent | 6253ff78be7f21898178799758717bfe59368b94 (diff) | |
download | numpy-da0497fdf35a7bf851f3625b0df07cde950f5f49.tar.gz |
MAINT: cleanup use of sys.exc_info
This code originates from python 2.6, before there was an `as` clause in `except`.
This removes all callers of `numpy.distutils.compat.get_exception`.
Diffstat (limited to 'numpy/distutils/fcompiler/compaq.py')
-rw-r--r-- | numpy/distutils/fcompiler/compaq.py | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/numpy/distutils/fcompiler/compaq.py b/numpy/distutils/fcompiler/compaq.py index 671b3a55f..51ad20d01 100644 --- a/numpy/distutils/fcompiler/compaq.py +++ b/numpy/distutils/fcompiler/compaq.py @@ -6,7 +6,6 @@ import os import sys from numpy.distutils.fcompiler import FCompiler -from numpy.distutils.compat import get_exception from distutils.errors import DistutilsPlatformError compilers = ['CompaqFCompiler'] @@ -82,19 +81,16 @@ class CompaqVisualFCompiler(FCompiler): ar_exe = m.lib except DistutilsPlatformError: pass - except AttributeError: - msg = get_exception() + except AttributeError as e: if '_MSVCCompiler__root' in str(msg): print('Ignoring "%s" (I think it is msvccompiler.py bug)' % (msg)) else: raise - except IOError: - e = get_exception() + except IOError as e: if not "vcvarsall.bat" in str(e): print("Unexpected IOError in", __file__) raise e - except ValueError: - e = get_exception() + except ValueError as e: if not "'path'" in str(e): print("Unexpected ValueError in", __file__) raise e |