Commits

Arc Riley committed 07b2cfe

Applied type checking fix from Python 3.1.2 distutils

Comments (0)

Files changed (1)

distutils2/compiler/unixccompiler.py

 
 
 import os, sys
-from types import StringType, NoneType
 
 from distutils2.util import newer
 from distutils2.compiler.ccompiler import CCompiler
 
         lib_opts = gen_lib_options(self, library_dirs, runtime_library_dirs,
                                    libraries)
-        if type(output_dir) not in (StringType, NoneType):
+        if not isinstance(output_dir, (str, type(None))):
             raise TypeError, "'output_dir' must be a string or None"
         if output_dir is not None:
             output_filename = os.path.join(output_dir, output_filename)