summaryrefslogtreecommitdiffstats
path: root/BaseTools/Source/Python/Workspace/InfBuildData.py
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/Workspace/InfBuildData.py
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/Workspace/InfBuildData.py')
-rw-r--r--BaseTools/Source/Python/Workspace/InfBuildData.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/BaseTools/Source/Python/Workspace/InfBuildData.py b/BaseTools/Source/Python/Workspace/InfBuildData.py
index f0c7e6ddd4..fc779a9d25 100644
--- a/BaseTools/Source/Python/Workspace/InfBuildData.py
+++ b/BaseTools/Source/Python/Workspace/InfBuildData.py
@@ -32,7 +32,7 @@ from Workspace.BuildClassObject import ModuleBuildClassObject, LibraryClassObjec
#
def _ProtocolValue(CName, PackageList, Inffile = None):
for P in PackageList:
- ProtocolKeys = P.Protocols.keys()
+ ProtocolKeys = list(P.Protocols.keys())
if Inffile and P._PrivateProtocols:
if not Inffile.startswith(P.MetaFile.Dir):
ProtocolKeys = [x for x in P.Protocols if x not in P._PrivateProtocols]
@@ -51,7 +51,7 @@ def _ProtocolValue(CName, PackageList, Inffile = None):
#
def _PpiValue(CName, PackageList, Inffile = None):
for P in PackageList:
- PpiKeys = P.Ppis.keys()
+ PpiKeys = list(P.Ppis.keys())
if Inffile and P._PrivatePpis:
if not Inffile.startswith(P.MetaFile.Dir):
PpiKeys = [x for x in P.Ppis if x not in P._PrivatePpis]