General cleanup, raise normalization in Lib/distutils.
diff --git a/Lib/distutils/bcppcompiler.py b/Lib/distutils/bcppcompiler.py
index b6a3bf6..1ab76c5 100644
--- a/Lib/distutils/bcppcompiler.py
+++ b/Lib/distutils/bcppcompiler.py
@@ -11,8 +11,6 @@
# someone should sit down and factor out the common code as
# WindowsCCompiler! --GPW
-# This module should be kept compatible with Python 2.1.
-
__revision__ = "$Id$"
@@ -116,7 +114,7 @@
try:
self.spawn (["brcc32", "-fo", obj, src])
except DistutilsExecError as msg:
- raise CompileError, msg
+ raise CompileError(msg)
continue # the 'for' loop
# The next two are both for the real compiler.
@@ -140,7 +138,7 @@
[input_opt, output_opt] +
extra_postargs + [src])
except DistutilsExecError as msg:
- raise CompileError, msg
+ raise CompileError(msg)
return objects
@@ -165,7 +163,7 @@
try:
self.spawn ([self.lib] + lib_args)
except DistutilsExecError as msg:
- raise LibError, msg
+ raise LibError(msg)
else:
log.debug("skipping %s (up-to-date)", output_filename)
@@ -299,7 +297,7 @@
try:
self.spawn ([self.linker] + ld_args)
except DistutilsExecError as msg:
- raise LinkError, msg
+ raise LinkError(msg)
else:
log.debug("skipping %s (up-to-date)", output_filename)
@@ -345,9 +343,8 @@
# use normcase to make sure '.rc' is really '.rc' and not '.RC'
(base, ext) = os.path.splitext (os.path.normcase(src_name))
if ext not in (self.src_extensions + ['.rc','.res']):
- raise UnknownFileError, \
- "unknown file type '%s' (from '%s')" % \
- (ext, src_name)
+ raise UnknownFileError("unknown file type '%s' (from '%s')" % \
+ (ext, src_name))
if strip_dir:
base = os.path.basename (base)
if ext == '.res':
@@ -393,6 +390,6 @@
self.spawn(pp_args)
except DistutilsExecError as msg:
print(msg)
- raise CompileError, msg
+ raise CompileError(msg)
# preprocess()