summaryrefslogtreecommitdiff
path: root/numpy/_import_tools.py
diff options
context:
space:
mode:
authorCharles Harris <charlesr.harris@gmail.com>2013-02-26 20:04:59 -0700
committerCharles Harris <charlesr.harris@gmail.com>2013-02-26 20:04:59 -0700
commit705bf928e1256a06019c75ee945370fbe89cdde7 (patch)
tree3e1d8ebcef67a93d8d5eeb63db1256406ae5c49f /numpy/_import_tools.py
parent17774a6d58b889b6b7a25d6af5b66f2148d47f41 (diff)
downloadnumpy-705bf928e1256a06019c75ee945370fbe89cdde7.tar.gz
2to3: Use modern exception syntax.
Example: except ValueError,msg: -> except ValueError as msg:
Diffstat (limited to 'numpy/_import_tools.py')
-rw-r--r--numpy/_import_tools.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/numpy/_import_tools.py b/numpy/_import_tools.py
index c0a901a8d..6223dd57f 100644
--- a/numpy/_import_tools.py
+++ b/numpy/_import_tools.py
@@ -68,7 +68,7 @@ class PackageLoader(object):
try:
exec 'import %s.info as info' % (package_name)
info_modules[package_name] = info
- except ImportError, msg:
+ except ImportError as msg:
self.warn('No scipy-style subpackage %r found in %s. '\
'Ignoring: %s'\
% (package_name,':'.join(self.parent_path), msg))
@@ -87,7 +87,7 @@ class PackageLoader(object):
open(info_file,filedescriptor[1]),
info_file,
filedescriptor)
- except Exception,msg:
+ except Exception as msg:
self.error(msg)
info_module = None
@@ -241,7 +241,7 @@ class PackageLoader(object):
frame = self.parent_frame
try:
exec (cmdstr, frame.f_globals,frame.f_locals)
- except Exception,msg:
+ except Exception as msg:
self.error('%s -> failed: %s' % (cmdstr,msg))
return True
else: