summaryrefslogtreecommitdiffstats
path: root/Lib/imputil.py
diff options
context:
space:
mode:
authorCollin Winter <collinw@gmail.com>2007-08-30 01:19:48 (GMT)
committerCollin Winter <collinw@gmail.com>2007-08-30 01:19:48 (GMT)
commitce36ad8a467d914eb5c91f33835b9eaea18ee93b (patch)
tree05bf654f3359e20b455dc300bd860bba5d291c8d /Lib/imputil.py
parent8b3febef2f96c35e9aad9db2ef499db040fdefae (diff)
downloadcpython-ce36ad8a467d914eb5c91f33835b9eaea18ee93b.zip
cpython-ce36ad8a467d914eb5c91f33835b9eaea18ee93b.tar.gz
cpython-ce36ad8a467d914eb5c91f33835b9eaea18ee93b.tar.bz2
Raise statement normalization in Lib/.
Diffstat (limited to 'Lib/imputil.py')
-rw-r--r--Lib/imputil.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/Lib/imputil.py b/Lib/imputil.py
index 8cd492c..1d09ba5 100644
--- a/Lib/imputil.py
+++ b/Lib/imputil.py
@@ -99,7 +99,7 @@ class ImportManager:
top_module = self._import_top_module(parts[0])
if not top_module:
# the topmost module wasn't found at all.
- raise ImportError, 'No module named ' + fqname
+ raise ImportError('No module named ' + fqname)
# fast-path simple imports
if len(parts) == 1:
@@ -137,7 +137,7 @@ class ImportManager:
# If the importer does not exist, then we have to bail. A missing
# importer means that something else imported the module, and we have
# no knowledge of how to get sub-modules out of the thing.
- raise ImportError, 'No module named ' + fqname
+ raise ImportError('No module named ' + fqname)
def _determine_import_context(self, globals):
"""Returns the context in which a module should be imported.
@@ -306,7 +306,7 @@ class Importer:
fqname = "%s.%s" % (m.__name__, part)
m = self._import_one(m, part, fqname)
if not m:
- raise ImportError, "No module named " + fqname
+ raise ImportError("No module named " + fqname)
return m
def _import_fromlist(self, package, fromlist):
@@ -325,7 +325,7 @@ class Importer:
subname = "%s.%s" % (package.__name__, sub)
submod = self._import_one(package, sub, subname)
if not submod:
- raise ImportError, "cannot import name " + subname
+ raise ImportError("cannot import name " + subname)
def _do_import(self, parent, parts, fromlist):
"""Attempt to import the module relative to parent.
@@ -377,7 +377,7 @@ class Importer:
object, then these names/values will be inserted *after* the module
has been loaded/initialized.
"""
- raise RuntimeError, "get_code not implemented"
+ raise RuntimeError("get_code not implemented")
######################################################################
@@ -452,7 +452,7 @@ def _os_bootstrap():
a = a + ':'
return a + b
else:
- raise ImportError, 'no os specific module found'
+ raise ImportError('no os specific module found')
if join is None:
def join(a, b, sep=sep):