summaryrefslogtreecommitdiff
path: root/numpy
diff options
context:
space:
mode:
authorCharles Harris <charlesr.harris@gmail.com>2013-02-28 16:42:45 -0700
committerCharles Harris <charlesr.harris@gmail.com>2013-02-28 16:42:45 -0700
commit9da706c1fb01a324e4a42760fbceeef78af3e2bc (patch)
tree09c764e4d6cc0329829dc731b0abda865343978a /numpy
parent0934653e151969f6912c911b5113306bd5f450f1 (diff)
downloadnumpy-9da706c1fb01a324e4a42760fbceeef78af3e2bc.tar.gz
2to3: Apply `sys_exc` fixes. Closes #3086.
This uses sys.exc_info in place of sys.exc_value. The new function goes back to at least 2002, so should be safe.
Diffstat (limited to 'numpy')
-rw-r--r--numpy/distutils/cpuinfo.py2
-rw-r--r--numpy/f2py/diagnose.py6
2 files changed, 4 insertions, 4 deletions
diff --git a/numpy/distutils/cpuinfo.py b/numpy/distutils/cpuinfo.py
index a9b2af108..96bf37bb3 100644
--- a/numpy/distutils/cpuinfo.py
+++ b/numpy/distutils/cpuinfo.py
@@ -516,7 +516,7 @@ class Win32CPUInfo(CPUInfoBase):
info[-1]["Model"]=int(srch.group("MDL"))
info[-1]["Stepping"]=int(srch.group("STP"))
except:
- print(sys.exc_value,'(ignoring)')
+ print(sys.exc_info()[1],'(ignoring)')
self.__class__.info = info
def _not_impl(self): pass
diff --git a/numpy/f2py/diagnose.py b/numpy/f2py/diagnose.py
index e45f9950e..1a4f6adf7 100644
--- a/numpy/f2py/diagnose.py
+++ b/numpy/f2py/diagnose.py
@@ -29,14 +29,14 @@ def run():
import numpy
has_newnumpy = 1
except ImportError:
- print 'Failed to import new numpy:', sys.exc_value
+ print 'Failed to import new numpy:', sys.exc_info()[1]
has_newnumpy = 0
try:
from numpy.f2py import f2py2e
has_f2py2e = 1
except ImportError:
- print 'Failed to import f2py2e:',sys.exc_value
+ print 'Failed to import f2py2e:',sys.exc_info()[1]
has_f2py2e = 0
try:
@@ -47,7 +47,7 @@ def run():
import numpy_distutils
has_numpy_distutils = 1
except ImportError:
- print 'Failed to import numpy_distutils:',sys.exc_value
+ print 'Failed to import numpy_distutils:',sys.exc_info()[1]
has_numpy_distutils = 0
if has_newnumpy: