From 27c4ceb41cf6b79d440deae215c68e117d69d641 Mon Sep 17 00:00:00 2001 From: Gary Lin Date: Mon, 25 Jun 2018 18:31:29 +0800 Subject: 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 Cc: Liming Gao Signed-off-by: Gary Lin Reviewed-by: Yonghong Zhu --- BaseTools/Source/Python/UPT/Object/Parser/InfLibraryClassesObject.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'BaseTools/Source/Python/UPT/Object/Parser/InfLibraryClassesObject.py') diff --git a/BaseTools/Source/Python/UPT/Object/Parser/InfLibraryClassesObject.py b/BaseTools/Source/Python/UPT/Object/Parser/InfLibraryClassesObject.py index e588c6ba66..5de1832b71 100644 --- a/BaseTools/Source/Python/UPT/Object/Parser/InfLibraryClassesObject.py +++ b/BaseTools/Source/Python/UPT/Object/Parser/InfLibraryClassesObject.py @@ -238,7 +238,7 @@ class InfLibraryClassObject(): LibItemObj.SetVersion(LibItem[1]) LibItemObj.SetSupArchList(__SupArchList) - if self.LibraryClasses.has_key((LibItemObj)): + if (LibItemObj) in self.LibraryClasses: LibraryList = self.LibraryClasses[LibItemObj] LibraryList.append(LibItemObj) self.LibraryClasses[LibItemObj] = LibraryList -- cgit v1.2.3