From 3a041437c981eac8447eca33a635038661e4faf1 Mon Sep 17 00:00:00 2001 From: Zhijux Fan Date: Wed, 28 Nov 2018 09:58:55 +0800 Subject: [PATCH] BaseTools: Rename iteritems to items replace the list iteritems by items in Python3. Cc: Bob Feng Cc: Liming Gao Cc: Yonghong Zhu Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Zhiju.Fan Tested-by: Laszlo Ersek Tested-by: Ard Biesheuvel Reviewed-by: Liming Gao Reviewed-by: Bob Feng --- BaseTools/Source/Python/AutoGen/GenMake.py | 6 +++--- BaseTools/Source/Python/Workspace/DscBuildData.py | 2 +- BaseTools/Source/Python/build/build.py | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/BaseTools/Source/Python/AutoGen/GenMake.py b/BaseTools/Source/Python/AutoGen/GenMake.py index 4da10e3950..0e886967cc 100644 --- a/BaseTools/Source/Python/AutoGen/GenMake.py +++ b/BaseTools/Source/Python/AutoGen/GenMake.py @@ -485,7 +485,7 @@ cleanlib: # EdkII modules always use "_ModuleEntryPoint" as entry point ImageEntryPoint = "_ModuleEntryPoint" - for k, v in MyAgo.Module.Defines.iteritems(): + for k, v in MyAgo.Module.Defines.items(): if k not in MyAgo.Macros: MyAgo.Macros[k] = v @@ -497,7 +497,7 @@ cleanlib: MyAgo.Macros['IMAGE_ENTRY_POINT'] = ImageEntryPoint PCI_COMPRESS_Flag = False - for k, v in MyAgo.Module.Defines.iteritems(): + for k, v in MyAgo.Module.Defines.items(): if 'PCI_COMPRESS' == k and 'TRUE' == v: PCI_COMPRESS_Flag = True @@ -661,7 +661,7 @@ cleanlib: "module_relative_directory" : MyAgo.SourceDir, "module_dir" : mws.join (self.Macros["WORKSPACE"], MyAgo.SourceDir), "package_relative_directory": package_rel_dir, - "module_extra_defines" : ["%s = %s" % (k, v) for k, v in MyAgo.Module.Defines.iteritems()], + "module_extra_defines" : ["%s = %s" % (k, v) for k, v in MyAgo.Module.Defines.items()], "architecture" : MyAgo.Arch, "toolchain_tag" : MyAgo.ToolChain, diff --git a/BaseTools/Source/Python/Workspace/DscBuildData.py b/BaseTools/Source/Python/Workspace/DscBuildData.py index 0dad04212e..9c5596927f 100644 --- a/BaseTools/Source/Python/Workspace/DscBuildData.py +++ b/BaseTools/Source/Python/Workspace/DscBuildData.py @@ -1676,7 +1676,7 @@ class DscBuildData(PlatformBuildClassObject): else: PcdValueDict[PcdCName, TokenSpaceGuid] = {SkuName:(PcdValue, DatumType, MaxDatumSize)} - for ((PcdCName, TokenSpaceGuid), PcdSetting) in PcdValueDict.iteritems(): + for ((PcdCName, TokenSpaceGuid), PcdSetting) in PcdValueDict.items(): if self.SkuIdMgr.SystemSkuId in PcdSetting: PcdValue, DatumType, MaxDatumSize = PcdSetting[self.SkuIdMgr.SystemSkuId] elif TAB_DEFAULT in PcdSetting: diff --git a/BaseTools/Source/Python/build/build.py b/BaseTools/Source/Python/build/build.py index d07c8f84d6..94074b89b4 100644 --- a/BaseTools/Source/Python/build/build.py +++ b/BaseTools/Source/Python/build/build.py @@ -2088,7 +2088,7 @@ class Build(): # Look through the tool definitions for GUIDed tools guidAttribs = [] - for (attrib, value) in self.ToolDef.ToolsDefTxtDictionary.iteritems(): + for (attrib, value) in self.ToolDef.ToolsDefTxtDictionary.items(): if attrib.upper().endswith('_GUID'): split = attrib.split('_') thisPrefix = '_'.join(split[0:3]) + '_' -- 2.39.2