mirror of
https://github.com/python/cpython.git
synced 2025-11-01 10:45:30 +00:00
General cleanup, raise normalization in Lib/distutils.
This commit is contained in:
parent
a73bfee73d
commit
5b7e9d76f3
47 changed files with 963 additions and 1640 deletions
|
|
@ -80,13 +80,13 @@ class EMXCCompiler (UnixCCompiler):
|
|||
try:
|
||||
self.spawn(["rc", "-r", src])
|
||||
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,
|
||||
|
|
@ -189,9 +189,8 @@ class EMXCCompiler (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']):
|
||||
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 == '.rc':
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue