From 9a794fa867d664aaf85a82be2c7fadf2b7d5fe21 Mon Sep 17 00:00:00 2001 From: cookedm Date: Wed, 1 Feb 2006 22:55:38 +0000 Subject: Replace type(a) is (something) with appropiate is_string/is_sequence tests --- numpy/distutils/command/build_ext.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'numpy/distutils/command/build_ext.py') diff --git a/numpy/distutils/command/build_ext.py b/numpy/distutils/command/build_ext.py index a7703ea7c..161677c86 100644 --- a/numpy/distutils/command/build_ext.py +++ b/numpy/distutils/command/build_ext.py @@ -5,7 +5,6 @@ import os import string import sys from glob import glob -from types import * from distutils.dep_util import newer_group, newer from distutils.command.build_ext import build_ext as old_build_ext @@ -13,7 +12,7 @@ from distutils.command.build_ext import build_ext as old_build_ext from numpy.distutils import log from numpy.distutils.misc_util import filter_sources, has_f_sources, \ has_cxx_sources, get_ext_source_files, all_strings, \ - get_numpy_include_dirs + get_numpy_include_dirs, is_sequence from distutils.errors import DistutilsFileError class build_ext (old_build_ext): @@ -113,7 +112,7 @@ class build_ext (old_build_ext): def build_extension(self, ext): sources = ext.sources - if sources is None or type(sources) not in (ListType, TupleType): + if sources is None or not is_sequence(sources): raise DistutilsSetupError, \ ("in 'ext_modules' option (extension '%s'), " + "'sources' must be present and must be " + -- cgit v1.2.1