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>
This commit is contained in:
committed by
Yonghong Zhu
parent
674e2014ce
commit
98120f5fe2
@ -204,7 +204,7 @@ def genGuidString(guidreffile):
|
||||
if len(guidLineList) == 2:
|
||||
guid = guidLineList[0]
|
||||
guidName = guidLineList[1]
|
||||
if guid not in dictGuid.keys() :
|
||||
if guid not in dictGuid :
|
||||
dictGuid[guid] = guidName
|
||||
|
||||
def createSym(symbolName):
|
||||
@ -256,7 +256,7 @@ def main():
|
||||
for smiEntry in SmiEntry:
|
||||
if smiEntry.hasAttribute("HandlerType"):
|
||||
guidValue = smiEntry.getAttribute("HandlerType")
|
||||
if guidValue in dictGuid.keys() :
|
||||
if guidValue in dictGuid:
|
||||
smiEntry.setAttribute("HandlerType", dictGuid[guidValue])
|
||||
SmiHandler = smiEntry.getElementsByTagName("SmiHandler")
|
||||
for smiHandler in SmiHandler:
|
||||
|
Reference in New Issue
Block a user