From 98120f5fe2199de29c0cce8e92c692b23adf0cf7 Mon Sep 17 00:00:00 2001 From: "Carsey, Jaben" Date: Fri, 6 Apr 2018 07:14:02 +0800 Subject: BaseTools: refactor and remove out of date use of .keys() this is no longer required to make dictionary objects iterable. Cc: Liming Gao Cc: Yonghong Zhu Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey Reviewed-by: Yonghong Zhu --- BaseTools/Source/Python/GenFds/Section.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'BaseTools/Source/Python/GenFds/Section.py') diff --git a/BaseTools/Source/Python/GenFds/Section.py b/BaseTools/Source/Python/GenFds/Section.py index 5e0b4bee7d..6335c249a6 100644 --- a/BaseTools/Source/Python/GenFds/Section.py +++ b/BaseTools/Source/Python/GenFds/Section.py @@ -111,10 +111,7 @@ class Section (SectionClassObject): # @retval tuple (File list, boolean) # def GetFileList(FfsInf, FileType, FileExtension, Dict = {}, IsMakefile=False): - if FileType in Section.SectFileType.keys() : - IsSect = True - else : - IsSect = False + IsSect = FileType in Section.SectFileType if FileExtension is not None: Suffix = FileExtension -- cgit v1.2.3