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>
This commit is contained in:
@ -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]
|
||||
|
Reference in New Issue
Block a user