BaseTools: Remove the deprecated hash_key()
Replace "has_key()" with "in" to be compatible with python3. Based on "futurize -f lib2to3.fixes.fix_has_key" Contributed-under: TianoCore Contribution Agreement 1.1 Cc: Yonghong Zhu <yonghong.zhu@intel.com> Cc: Liming Gao <liming.gao@intel.com> Signed-off-by: Gary Lin <glin@suse.com> Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
This commit is contained in:
@ -114,7 +114,7 @@ class InfSpecialCommentObject(InfSectionCommonDef):
|
||||
Type == DT.TYPE_EVENT_SECTION or \
|
||||
Type == DT.TYPE_BOOTMODE_SECTION:
|
||||
for Item in SepcialSectionList:
|
||||
if self.SpecialComments.has_key(Type):
|
||||
if Type in self.SpecialComments:
|
||||
ObjList = self.SpecialComments[Type]
|
||||
ObjList.append(Item)
|
||||
self.SpecialComments[Type] = ObjList
|
||||
@ -145,4 +145,4 @@ def ErrorInInf(Message=None, ErrorCode=None, LineInfo=None, RaiseError=True):
|
||||
File=LineInfo[0],
|
||||
Line=LineInfo[1],
|
||||
ExtraData=LineInfo[2],
|
||||
RaiseError=RaiseError)
|
||||
RaiseError=RaiseError)
|
||||
|
Reference in New Issue
Block a user