[Python-checkins] r70216 - python/branches/py3k/Lib/distutils/msvc9compiler.py

tarek.ziade python-checkins at python.org
Sat Mar 7 02:12:09 CET 2009


Author: tarek.ziade
Date: Sat Mar  7 02:12:09 2009
New Revision: 70216

Log:
fixed except syntax for py3

Modified:
   python/branches/py3k/Lib/distutils/msvc9compiler.py

Modified: python/branches/py3k/Lib/distutils/msvc9compiler.py
==============================================================================
--- python/branches/py3k/Lib/distutils/msvc9compiler.py	(original)
+++ python/branches/py3k/Lib/distutils/msvc9compiler.py	Sat Mar  7 02:12:09 2009
@@ -479,7 +479,7 @@
                 try:
                     self.spawn([self.rc] + pp_opts +
                                [output_opt] + [input_opt])
-                except DistutilsExecError, msg:
+                except DistutilsExecError as msg:
                     raise CompileError(msg)
                 continue
             elif ext in self._mc_extensions:
@@ -506,7 +506,7 @@
                     self.spawn([self.rc] +
                                ["/fo" + obj] + [rc_file])
 
-                except DistutilsExecError, msg:
+                except DistutilsExecError as msg:
                     raise CompileError(msg)
                 continue
             else:
@@ -519,7 +519,7 @@
                 self.spawn([self.cc] + compile_opts + pp_opts +
                            [input_opt, output_opt] +
                            extra_postargs)
-            except DistutilsExecError, msg:
+            except DistutilsExecError as msg:
                 raise CompileError(msg)
 
         return objects
@@ -544,7 +544,7 @@
                 pass # XXX what goes here?
             try:
                 self.spawn([self.lib] + lib_args)
-            except DistutilsExecError, msg:
+            except DistutilsExecError as msg:
                 raise LibError(msg)
         else:
             log.debug("skipping %s (up-to-date)", output_filename)
@@ -633,7 +633,7 @@
             self.mkpath(os.path.dirname(output_filename))
             try:
                 self.spawn([self.linker] + ld_args)
-            except DistutilsExecError, msg:
+            except DistutilsExecError as msg:
                 raise LinkError(msg)
 
             # embed the manifest
@@ -649,7 +649,7 @@
             try:
                 self.spawn(['mt.exe', '-nologo', '-manifest',
                             temp_manifest, out_arg])
-            except DistutilsExecError, msg:
+            except DistutilsExecError as msg:
                 raise LinkError(msg)
         else:
             log.debug("skipping %s (up-to-date)", output_filename)


More information about the Python-checkins mailing list