summaryrefslogtreecommitdiffstats
path: root/BaseTools/Source/Python/UPT/Object/Parser/InfPackagesObject.py
diff options
context:
space:
mode:
authorGary Lin <glin@suse.com>2018-06-25 18:31:29 +0800
committerYonghong Zhu <yonghong.zhu@intel.com>2018-06-27 16:33:23 +0800
commit27c4ceb41cf6b79d440deae215c68e117d69d641 (patch)
tree07b096fb976ac5d38043580f1724092f3c7be427 /BaseTools/Source/Python/UPT/Object/Parser/InfPackagesObject.py
parent890d8ede6867dd43d96b5b04454f0b571938e3a3 (diff)
downloadedk2-27c4ceb41cf6b79d440deae215c68e117d69d641.tar.gz
edk2-27c4ceb41cf6b79d440deae215c68e117d69d641.tar.bz2
edk2-27c4ceb41cf6b79d440deae215c68e117d69d641.zip
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>
Diffstat (limited to 'BaseTools/Source/Python/UPT/Object/Parser/InfPackagesObject.py')
-rw-r--r--BaseTools/Source/Python/UPT/Object/Parser/InfPackagesObject.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/BaseTools/Source/Python/UPT/Object/Parser/InfPackagesObject.py b/BaseTools/Source/Python/UPT/Object/Parser/InfPackagesObject.py
index 01c854a847..bfac2b6b57 100644
--- a/BaseTools/Source/Python/UPT/Object/Parser/InfPackagesObject.py
+++ b/BaseTools/Source/Python/UPT/Object/Parser/InfPackagesObject.py
@@ -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 \ No newline at end of file
+ return self.Packages