]> git.proxmox.com Git - mirror_edk2.git/commitdiff
BaseTools: Remove types.TypeType
authorGary Lin <glin@suse.com>
Mon, 25 Jun 2018 10:31:31 +0000 (18:31 +0800)
committerYonghong Zhu <yonghong.zhu@intel.com>
Wed, 27 Jun 2018 08:33:24 +0000 (16:33 +0800)
"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>
BaseTools/Tests/TestTools.py

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