summaryrefslogtreecommitdiff
path: root/Lib/distutils/bcppcompiler.py
diff options
context:
space:
mode:
authorCollin Winter <collinw@gmail.com>2007-08-30 03:52:21 +0000
committerCollin Winter <collinw@gmail.com>2007-08-30 03:52:21 +0000
commit5b7e9d76f39dbf63573519c178835f72e5a5027a (patch)
tree96b04b9d52d875c9f39d148d88efeafb5184fd35 /Lib/distutils/bcppcompiler.py
parenta73bfee73da519a508e7d95bc55c1984ae7089bd (diff)
downloadcpython-git-5b7e9d76f39dbf63573519c178835f72e5a5027a.tar.gz
General cleanup, raise normalization in Lib/distutils.
Diffstat (limited to 'Lib/distutils/bcppcompiler.py')
-rw-r--r--Lib/distutils/bcppcompiler.py17
1 files changed, 7 insertions, 10 deletions
diff --git a/Lib/distutils/bcppcompiler.py b/Lib/distutils/bcppcompiler.py
index b6a3bf62ce..1ab76c5981 100644
--- a/Lib/distutils/bcppcompiler.py
+++ b/Lib/distutils/bcppcompiler.py
@@ -11,8 +11,6 @@ for the Borland C++ compiler.
# 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 @@ class BCPPCompiler(CCompiler) :
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 @@ class BCPPCompiler(CCompiler) :
[input_opt, output_opt] +
extra_postargs + [src])
except DistutilsExecError as msg:
- raise CompileError, msg
+ raise CompileError(msg)
return objects
@@ -165,7 +163,7 @@ class BCPPCompiler(CCompiler) :
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 @@ class BCPPCompiler(CCompiler) :
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 @@ class BCPPCompiler(CCompiler) :
# 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 @@ class BCPPCompiler(CCompiler) :
self.spawn(pp_args)
except DistutilsExecError as msg:
print(msg)
- raise CompileError, msg
+ raise CompileError(msg)
# preprocess()