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:
Gary Lin
2018-06-25 18:31:29 +08:00
committed by Yonghong Zhu
parent 890d8ede68
commit 27c4ceb41c
18 changed files with 39 additions and 40 deletions

View File

@ -103,7 +103,7 @@ class InfUserExtensionObject():
# Line=LineNo,
# ExtraData=None)
if self.UserExtension.has_key(IdContentItem):
if IdContentItem in self.UserExtension:
#
# Each UserExtensions section header must have a unique set
# of UserId, IdString and Arch values.
@ -130,4 +130,4 @@ class InfUserExtensionObject():
return True
def GetUserExtension(self):
return self.UserExtension
return self.UserExtension