diff options
author | Collin Winter <collinw@gmail.com> | 2007-08-30 03:52:21 (GMT) |
---|---|---|
committer | Collin Winter <collinw@gmail.com> | 2007-08-30 03:52:21 (GMT) |
commit | 5b7e9d76f39dbf63573519c178835f72e5a5027a (patch) | |
tree | 96b04b9d52d875c9f39d148d88efeafb5184fd35 /Lib/distutils/cygwinccompiler.py | |
parent | a73bfee73da519a508e7d95bc55c1984ae7089bd (diff) | |
download | cpython-5b7e9d76f39dbf63573519c178835f72e5a5027a.zip cpython-5b7e9d76f39dbf63573519c178835f72e5a5027a.tar.gz cpython-5b7e9d76f39dbf63573519c178835f72e5a5027a.tar.bz2 |
General cleanup, raise normalization in Lib/distutils.
Diffstat (limited to 'Lib/distutils/cygwinccompiler.py')
-rw-r--r-- | Lib/distutils/cygwinccompiler.py | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/Lib/distutils/cygwinccompiler.py b/Lib/distutils/cygwinccompiler.py index fae6848..bec72ca 100644 --- a/Lib/distutils/cygwinccompiler.py +++ b/Lib/distutils/cygwinccompiler.py @@ -45,8 +45,6 @@ cygwin in no-cygwin mode). # * mingw gcc 3.2/ld 2.13 works # (ld supports -shared) -# This module should be kept compatible with Python 2.1. - __revision__ = "$Id$" import os,sys,copy @@ -143,13 +141,13 @@ class CygwinCCompiler (UnixCCompiler): try: self.spawn(["windres", "-i", src, "-o", obj]) except DistutilsExecError as msg: - raise CompileError, msg + raise CompileError(msg) else: # for other files use the C-compiler try: self.spawn(self.compiler_so + cc_args + [src, '-o', obj] + extra_postargs) except DistutilsExecError as msg: - raise CompileError, msg + raise CompileError(msg) def link (self, target_desc, @@ -260,9 +258,8 @@ class CygwinCCompiler (UnixCCompiler): # 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' or ext == '.rc': |