From: Gary Lin Date: Mon, 25 Jun 2018 10:31:31 +0000 (+0800) Subject: BaseTools: Remove types.TypeType X-Git-Tag: edk2-stable201903~1519 X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=commitdiff_plain;h=aaa4c651bf5ba5fce14e9fe8c2c12687886f745d 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 Cc: Liming Gao Signed-off-by: Gary Lin Reviewed-by: Yonghong Zhu --- diff --git a/BaseTools/Tests/TestTools.py b/BaseTools/Tests/TestTools.py index be7b4ad428..20a4ea28aa 100644 --- a/BaseTools/Tests/TestTools.py +++ b/BaseTools/Tests/TestTools.py @@ -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):