From: Zhijux Fan <zhijux....@intel.com> replace the list iteritems by items in Python3.
Cc: Bob Feng <bob.c.f...@intel.com> Cc: Liming Gao <liming....@intel.com> Cc: Yonghong Zhu <yonghong....@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Zhiju.Fan <zhijux....@intel.com> --- 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 @@ -483,11 +483,11 @@ cleanlib: ImageEntryPoint = "EfiStart" else: # 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 if 'MODULE_ENTRY_POINT' not in MyAgo.Macros: MyAgo.Macros['MODULE_ENTRY_POINT'] = ModuleEntryPoint @@ -495,11 +495,11 @@ cleanlib: MyAgo.Macros['ARCH_ENTRY_POINT'] = ArchEntryPoint if 'IMAGE_ENTRY_POINT' not in MyAgo.Macros: 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 # tools definitions ToolsDef = [] @@ -659,11 +659,11 @@ cleanlib: "module_file" : MyAgo.MetaFile.Name, "module_file_base_name" : MyAgo.MetaFile.BaseName, "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, "build_target" : MyAgo.BuildTarget, 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 @@ -1674,11 +1674,11 @@ class DscBuildData(PlatformBuildClassObject): if (PcdCName, TokenSpaceGuid) in PcdValueDict: PcdValueDict[PcdCName, TokenSpaceGuid][SkuName] = (PcdValue, DatumType, MaxDatumSize) 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: PcdValue, DatumType, MaxDatumSize = PcdSetting[TAB_DEFAULT] elif TAB_COMMON 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 @@ -2086,11 +2086,11 @@ class Build(): # Build up the list of supported architectures for this build prefix = '%s_%s_%s_' % (BuildTarget, ToolChain, Arch) # 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]) + '_' if thisPrefix == prefix: guid = self.ToolDef.ToolsDefTxtDictionary[attrib] -- 2.20.1.windows.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel