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:
@ -272,7 +272,7 @@ class InfBinariesObject(InfSectionCommonDef):
|
||||
pass
|
||||
|
||||
if InfBianryVerItemObj is not None:
|
||||
if self.Binaries.has_key((InfBianryVerItemObj)):
|
||||
if (InfBianryVerItemObj) in self.Binaries:
|
||||
BinariesList = self.Binaries[InfBianryVerItemObj]
|
||||
BinariesList.append((InfBianryVerItemObj, VerComment))
|
||||
self.Binaries[InfBianryVerItemObj] = BinariesList
|
||||
@ -522,7 +522,7 @@ class InfBinariesObject(InfSectionCommonDef):
|
||||
# pass
|
||||
|
||||
if InfBianryCommonItemObj is not None:
|
||||
if self.Binaries.has_key((InfBianryCommonItemObj)):
|
||||
if (InfBianryCommonItemObj) in self.Binaries:
|
||||
BinariesList = self.Binaries[InfBianryCommonItemObj]
|
||||
BinariesList.append((InfBianryCommonItemObj, ItemComment))
|
||||
self.Binaries[InfBianryCommonItemObj] = BinariesList
|
||||
@ -673,7 +673,7 @@ class InfBinariesObject(InfSectionCommonDef):
|
||||
# pass
|
||||
|
||||
if InfBianryUiItemObj is not None:
|
||||
if self.Binaries.has_key((InfBianryUiItemObj)):
|
||||
if (InfBianryUiItemObj) in self.Binaries:
|
||||
BinariesList = self.Binaries[InfBianryUiItemObj]
|
||||
BinariesList.append((InfBianryUiItemObj, UiComment))
|
||||
self.Binaries[InfBianryUiItemObj] = BinariesList
|
||||
|
Reference in New Issue
Block a user