summaryrefslogtreecommitdiffstats
path: root/BaseTools/Source/Python/UPT
diff options
context:
space:
mode:
authorCarsey, Jaben </o=Intel/ou=Americas01/cn=Workers/cn=Carsey, Jaben>2018-04-06 07:14:02 +0800
committerYonghong Zhu <yonghong.zhu@intel.com>2018-04-10 10:05:16 +0800
commit98120f5fe2199de29c0cce8e92c692b23adf0cf7 (patch)
treecba80edbbad54736208d40182c7ecdaf0a946f7d /BaseTools/Source/Python/UPT
parent674e2014ce63040880208f2a0494fa1849f28f43 (diff)
downloadedk2-98120f5fe2199de29c0cce8e92c692b23adf0cf7.tar.gz
edk2-98120f5fe2199de29c0cce8e92c692b23adf0cf7.tar.bz2
edk2-98120f5fe2199de29c0cce8e92c692b23adf0cf7.zip
BaseTools: refactor and remove out of date use of .keys()
this is no longer required to make dictionary objects iterable. Cc: Liming Gao <liming.gao@intel.com> Cc: Yonghong Zhu <yonghong.zhu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey <jaben.carsey@intel.com> Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
Diffstat (limited to 'BaseTools/Source/Python/UPT')
-rw-r--r--BaseTools/Source/Python/UPT/PomAdapter/InfPomAlignment.py5
1 files changed, 1 insertions, 4 deletions
diff --git a/BaseTools/Source/Python/UPT/PomAdapter/InfPomAlignment.py b/BaseTools/Source/Python/UPT/PomAdapter/InfPomAlignment.py
index e37a0b6c3b..165ac11127 100644
--- a/BaseTools/Source/Python/UPT/PomAdapter/InfPomAlignment.py
+++ b/BaseTools/Source/Python/UPT/PomAdapter/InfPomAlignment.py
@@ -486,10 +486,7 @@ class InfPomAlignment(ModuleObject):
#
# Get all LibraryClasses
#
- LibClassObj = self.Parser.InfLibraryClassSection.LibraryClasses
- Keys = LibClassObj.keys()
- for Key in Keys:
- LibraryClassData = LibClassObj[Key]
+ for LibraryClassData in self.Parser.InfLibraryClassSection.LibraryClasses.values():
for Item in LibraryClassData:
LibraryClass = CommonObject.LibraryClassObject()
LibraryClass.SetUsage(DT.USAGE_ITEM_CONSUMES)