summaryrefslogtreecommitdiff
path: root/Lib/distutils/unixccompiler.py
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2007-01-10 16:19:56 +0000
committerGuido van Rossum <guido@python.org>2007-01-10 16:19:56 +0000
commitf16bc2a26e204536d477cddceaeeb5d6d9657c9e (patch)
treed08fadf5b04b876fa35cfd64d34764cc3e4241a7 /Lib/distutils/unixccompiler.py
parent6f516b70819184e9cf97cf4c6bbc8abfdea7133f (diff)
downloadcpython-f16bc2a26e204536d477cddceaeeb5d6d9657c9e.tar.gz
SF patch 1631942 by Collin Winter:
(a) "except E, V" -> "except E as V" (b) V is now limited to a simple name (local variable) (c) V is now deleted at the end of the except block
Diffstat (limited to 'Lib/distutils/unixccompiler.py')
-rw-r--r--Lib/distutils/unixccompiler.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/Lib/distutils/unixccompiler.py b/Lib/distutils/unixccompiler.py
index 75e8a5316e..0795f1206d 100644
--- a/Lib/distutils/unixccompiler.py
+++ b/Lib/distutils/unixccompiler.py
@@ -162,7 +162,7 @@ class UnixCCompiler(CCompiler):
self.mkpath(os.path.dirname(output_file))
try:
self.spawn(pp_args)
- except DistutilsExecError, msg:
+ except DistutilsExecError as msg:
raise CompileError, msg
def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts):
@@ -172,7 +172,7 @@ class UnixCCompiler(CCompiler):
try:
self.spawn(compiler_so + cc_args + [src, '-o', obj] +
extra_postargs)
- except DistutilsExecError, msg:
+ except DistutilsExecError as msg:
raise CompileError, msg
def create_static_lib(self, objects, output_libname,
@@ -196,7 +196,7 @@ class UnixCCompiler(CCompiler):
if self.ranlib:
try:
self.spawn(self.ranlib + [output_filename])
- except DistutilsExecError, msg:
+ except DistutilsExecError as msg:
raise LibError, msg
else:
log.debug("skipping %s (up-to-date)", output_filename)
@@ -250,7 +250,7 @@ class UnixCCompiler(CCompiler):
linker = _darwin_compiler_fixup(linker, ld_args)
self.spawn(linker + ld_args)
- except DistutilsExecError, msg:
+ except DistutilsExecError as msg:
raise LinkError, msg
else:
log.debug("skipping %s (up-to-date)", output_filename)