diff options
author | Charles Harris <charlesr.harris@gmail.com> | 2013-02-26 20:04:59 -0700 |
---|---|---|
committer | Charles Harris <charlesr.harris@gmail.com> | 2013-02-26 20:04:59 -0700 |
commit | 705bf928e1256a06019c75ee945370fbe89cdde7 (patch) | |
tree | 3e1d8ebcef67a93d8d5eeb63db1256406ae5c49f /numpy/tests | |
parent | 17774a6d58b889b6b7a25d6af5b66f2148d47f41 (diff) | |
download | numpy-705bf928e1256a06019c75ee945370fbe89cdde7.tar.gz |
2to3: Use modern exception syntax.
Example: except ValueError,msg: -> except ValueError as msg:
Diffstat (limited to 'numpy/tests')
-rw-r--r-- | numpy/tests/test_ctypeslib.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/numpy/tests/test_ctypeslib.py b/numpy/tests/test_ctypeslib.py index ac351191a..7bb93dd9b 100644 --- a/numpy/tests/test_ctypeslib.py +++ b/numpy/tests/test_ctypeslib.py @@ -18,7 +18,7 @@ class TestLoadLibrary(TestCase): try: cdll = load_library('multiarray', np.core.multiarray.__file__) - except ImportError, e: + except ImportError as e: msg = "ctypes is not available on this python: skipping the test" \ " (import error was: %s)" % str(e) print msg @@ -35,7 +35,7 @@ class TestLoadLibrary(TestCase): np.core.multiarray.__file__) except ImportError: print "No distutils available, skipping test." - except ImportError, e: + except ImportError as e: msg = "ctypes is not available on this python: skipping the test" \ " (import error was: %s)" % str(e) print msg |