summaryrefslogtreecommitdiffstats
path: root/BaseTools/Source/Python/build
diff options
context:
space:
mode:
authorFeng, Bob C <bob.c.feng@intel.com>2019-01-28 15:06:30 +0800
committerFeng, Bob C <bob.c.feng@intel.com>2019-02-01 11:09:24 +0800
commitf8d11e5a4aaa90bf63b4789f3993dd6d16c60787 (patch)
treece3fc46810e582eca7084e49b51121ee5a696605 /BaseTools/Source/Python/build
parent7fa0e68afd658bda001aaccf616837a4a493a385 (diff)
downloadedk2-f8d11e5a4aaa90bf63b4789f3993dd6d16c60787.tar.gz
edk2-f8d11e5a4aaa90bf63b4789f3993dd6d16c60787.tar.bz2
edk2-f8d11e5a4aaa90bf63b4789f3993dd6d16c60787.zip
BaseTools: the list and iterator translation
In python3,The keys of the dictionary not a list,It needs to be converted Cc: Bob Feng <bob.c.feng@intel.com> Cc: Liming Gao <liming.gao@intel.com> Cc: Yonghong Zhu <yonghong.zhu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Zhiju.Fan <zhijux.fan@intel.com> Tested-by: Laszlo Ersek <lersek@redhat.com> Tested-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Bob Feng <bob.c.feng@intel.com>
Diffstat (limited to 'BaseTools/Source/Python/build')
-rw-r--r--BaseTools/Source/Python/build/BuildReport.py4
-rw-r--r--BaseTools/Source/Python/build/build.py2
2 files changed, 3 insertions, 3 deletions
diff --git a/BaseTools/Source/Python/build/BuildReport.py b/BaseTools/Source/Python/build/BuildReport.py
index 9483262dd1..1cd1b0886a 100644
--- a/BaseTools/Source/Python/build/BuildReport.py
+++ b/BaseTools/Source/Python/build/BuildReport.py
@@ -1209,7 +1209,7 @@ class PcdReport(object):
def ParseStruct(self, struct):
HasDscOverride = False
if struct:
- for _, Values in struct.items():
+ for _, Values in list(struct.items()):
for Key, value in Values.items():
if value[1] and value[1].endswith('.dsc'):
HasDscOverride = True
@@ -1425,7 +1425,7 @@ class PcdReport(object):
FiledOverrideFlag = False
OverrideValues = Pcd.SkuOverrideValues[Sku]
if OverrideValues:
- Keys = OverrideValues.keys()
+ Keys = list(OverrideValues.keys())
OverrideFieldStruct = self.OverrideFieldValue(Pcd, OverrideValues[Keys[0]])
self.PrintStructureInfo(File, OverrideFieldStruct)
FiledOverrideFlag = True
diff --git a/BaseTools/Source/Python/build/build.py b/BaseTools/Source/Python/build/build.py
index c2b22cca70..43fc3c8077 100644
--- a/BaseTools/Source/Python/build/build.py
+++ b/BaseTools/Source/Python/build/build.py
@@ -443,7 +443,7 @@ class BuildTask:
# get all pending tasks
BuildTask._PendingQueueLock.acquire()
- BuildObjectList = BuildTask._PendingQueue.keys()
+ BuildObjectList = list(BuildTask._PendingQueue.keys())
#
# check if their dependency is resolved, and if true, move them
# into ready queue