BaseTools: Remove types.TypeType

"types.TypeType" is now an alias of the built-in "type" and is not
compatible with python 3.

Contributed-under: TianoCore Contribution Agreement 1.1
Cc: Yonghong Zhu <yonghong.zhu@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Signed-off-by: Gary Lin <glin@suse.com>
Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
This commit is contained in:
Gary Lin 2018-06-25 18:31:31 +08:00 committed by Yonghong Zhu
parent 92beb1e4c7
commit aaa4c651bf
1 changed files with 1 additions and 2 deletions

View File

@ -23,7 +23,6 @@ import random
import shutil
import subprocess
import sys
import types
import unittest
TestsDir = os.path.realpath(os.path.split(sys.argv[0])[0])
@ -42,7 +41,7 @@ if PythonSourceDir not in sys.path:
def MakeTheTestSuite(localItems):
tests = []
for name, item in localItems.iteritems():
if isinstance(item, types.TypeType):
if isinstance(item, type):
if issubclass(item, unittest.TestCase):
tests.append(unittest.TestLoader().loadTestsFromTestCase(item))
elif issubclass(item, unittest.TestSuite):