From f8d11e5a4aaa90bf63b4789f3993dd6d16c60787 Mon Sep 17 00:00:00 2001 From: "Feng, Bob C" Date: Mon, 28 Jan 2019 15:06:30 +0800 Subject: BaseTools: the list and iterator translation In python3,The keys of the dictionary not a list,It needs to be converted Cc: Bob Feng Cc: Liming Gao Cc: Yonghong Zhu Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Zhiju.Fan Tested-by: Laszlo Ersek Tested-by: Ard Biesheuvel Reviewed-by: Liming Gao Reviewed-by: Bob Feng --- BaseTools/Source/Python/Workspace/InfBuildData.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'BaseTools/Source/Python/Workspace/InfBuildData.py') 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] -- cgit v1.2.3