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:
@ -224,7 +224,7 @@ class InfSourcesObject(InfSectionCommonDef):
|
||||
|
||||
ItemObj.SetSupArchList(__SupArchList)
|
||||
|
||||
if self.Sources.has_key((ItemObj)):
|
||||
if (ItemObj) in self.Sources:
|
||||
SourceContent = self.Sources[ItemObj]
|
||||
SourceContent.append(ItemObj)
|
||||
self.Sources[ItemObj] = SourceContent
|
||||
@ -237,4 +237,3 @@ class InfSourcesObject(InfSectionCommonDef):
|
||||
|
||||
def GetSources(self):
|
||||
return self.Sources
|
||||
|
Reference in New Issue
Block a user