1111# someone should sit down and factor out the common code as
1212# WindowsCCompiler! --GPW
1313
14- # This module should be kept compatible with Python 2.1.
15-
1614__revision__ = "$Id$"
1715
1816
@@ -116,7 +114,7 @@ def compile(self, sources,
116114 try :
117115 self .spawn (["brcc32" , "-fo" , obj , src ])
118116 except DistutilsExecError as msg :
119- raise CompileError , msg
117+ raise CompileError ( msg )
120118 continue # the 'for' loop
121119
122120 # The next two are both for the real compiler.
@@ -140,7 +138,7 @@ def compile(self, sources,
140138 [input_opt , output_opt ] +
141139 extra_postargs + [src ])
142140 except DistutilsExecError as msg :
143- raise CompileError , msg
141+ raise CompileError ( msg )
144142
145143 return objects
146144
@@ -165,7 +163,7 @@ def create_static_lib (self,
165163 try :
166164 self .spawn ([self .lib ] + lib_args )
167165 except DistutilsExecError as msg :
168- raise LibError , msg
166+ raise LibError ( msg )
169167 else :
170168 log .debug ("skipping %s (up-to-date)" , output_filename )
171169
@@ -299,7 +297,7 @@ def link (self,
299297 try :
300298 self .spawn ([self .linker ] + ld_args )
301299 except DistutilsExecError as msg :
302- raise LinkError , msg
300+ raise LinkError ( msg )
303301
304302 else :
305303 log .debug ("skipping %s (up-to-date)" , output_filename )
@@ -345,9 +343,8 @@ def object_filenames (self,
345343 # use normcase to make sure '.rc' is really '.rc' and not '.RC'
346344 (base , ext ) = os .path .splitext (os .path .normcase (src_name ))
347345 if ext not in (self .src_extensions + ['.rc' ,'.res' ]):
348- raise UnknownFileError , \
349- "unknown file type '%s' (from '%s')" % \
350- (ext , src_name )
346+ raise UnknownFileError ("unknown file type '%s' (from '%s')" % \
347+ (ext , src_name ))
351348 if strip_dir :
352349 base = os .path .basename (base )
353350 if ext == '.res' :
@@ -393,6 +390,6 @@ def preprocess (self,
393390 self .spawn (pp_args )
394391 except DistutilsExecError as msg :
395392 print (msg )
396- raise CompileError , msg
393+ raise CompileError ( msg )
397394
398395 # preprocess()
0 commit comments