From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=192.55.52.151; helo=mga17.intel.com; envelope-from=bob.c.feng@intel.com; receiver=edk2-devel@lists.01.org Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 2C60921959CB2 for ; Thu, 24 Jan 2019 21:04:48 -0800 (PST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga107.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 24 Jan 2019 21:04:48 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.56,519,1539673200"; d="scan'208";a="294272422" Received: from shwdepsi1121.ccr.corp.intel.com ([10.239.158.47]) by orsmga005.jf.intel.com with ESMTP; 24 Jan 2019 21:04:46 -0800 From: "Feng, Bob C" To: edk2-devel@lists.01.org Cc: Zhijux Fan , Bob Feng , Liming Gao , Yonghong Zhu Date: Fri, 25 Jan 2019 12:55:56 +0800 Message-Id: <20190125045626.14700-4-bob.c.feng@intel.com> X-Mailer: git-send-email 2.20.1.windows.1 In-Reply-To: <20190125045626.14700-1-bob.c.feng@intel.com> References: <20190125045626.14700-1-bob.c.feng@intel.com> MIME-Version: 1.0 Subject: [Patch 03/33] BaseTools: Rename iteritems to items X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Jan 2019 05:04:48 -0000 Content-Transfer-Encoding: 8bit From: Zhijux Fan 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 --- 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 3266333cc4..b7aefc9ae7 100644 --- a/BaseTools/Source/Python/build/build.py +++ b/BaseTools/Source/Python/build/build.py @@ -2123,11 +2123,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