diff options
Diffstat (limited to 'Lib/distutils/bcppcompiler.py')
-rw-r--r-- | Lib/distutils/bcppcompiler.py | 17 |
1 files changed, 7 insertions, 10 deletions
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 @@ 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() |