summaryrefslogtreecommitdiff
path: root/numpy/distutils/system_info.py
diff options
context:
space:
mode:
authorEric Wieser <wieser.eric@gmail.com>2020-01-05 21:16:11 +0000
committerEric Wieser <wieser.eric@gmail.com>2020-01-05 21:22:53 +0000
commitda0497fdf35a7bf851f3625b0df07cde950f5f49 (patch)
tree2bfd303e0c20edbbc2b0523b852f6f9710e4dd92 /numpy/distutils/system_info.py
parent6253ff78be7f21898178799758717bfe59368b94 (diff)
downloadnumpy-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/system_info.py')
-rw-r--r--numpy/distutils/system_info.py13
1 files changed, 6 insertions, 7 deletions
diff --git a/numpy/distutils/system_info.py b/numpy/distutils/system_info.py
index fc7018af3..bc311f55a 100644
--- a/numpy/distutils/system_info.py
+++ b/numpy/distutils/system_info.py
@@ -163,7 +163,6 @@ from numpy.distutils.exec_command import (
from numpy.distutils.misc_util import (is_sequence, is_string,
get_shared_lib_extension)
from numpy.distutils.command.config import config as cmd_config
-from numpy.distutils.compat import get_exception
from numpy.distutils import customized_ccompiler as _customized_ccompiler
from numpy.distutils import _shell_utils
import distutils.ccompiler
@@ -2541,18 +2540,18 @@ class numerix_info(system_info):
try:
import numpy # noqa: F401
which = "numpy", "defaulted"
- except ImportError:
- msg1 = str(get_exception())
+ except ImportError as e:
+ msg1 = str(e)
try:
import Numeric # noqa: F401
which = "numeric", "defaulted"
- except ImportError:
- msg2 = str(get_exception())
+ except ImportError as e:
+ msg2 = str(e)
try:
import numarray # noqa: F401
which = "numarray", "defaulted"
- except ImportError:
- msg3 = str(get_exception())
+ except ImportError as e:
+ msg3 = str(e)
log.info(msg1)
log.info(msg2)
log.info(msg3)