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:
@ -171,7 +171,7 @@ class InfPackageObject():
|
||||
#
|
||||
pass
|
||||
|
||||
if self.Packages.has_key((PackageItemObj)):
|
||||
if (PackageItemObj) in self.Packages:
|
||||
PackageList = self.Packages[PackageItemObj]
|
||||
PackageList.append(PackageItemObj)
|
||||
self.Packages[PackageItemObj] = PackageList
|
||||
@ -184,4 +184,4 @@ class InfPackageObject():
|
||||
|
||||
def GetPackages(self, Arch = None):
|
||||
if Arch is None:
|
||||
return self.Packages
|
||||
return self.Packages
|
||||
|
Reference in New Issue
Block a user