]> git.proxmox.com Git - mirror_edk2.git/blobdiff - BaseTools/Source/Python/GenFds/FfsFileStatement.py
BaseTools: refactor and remove un-needed use of .keys() on dictionaries
[mirror_edk2.git] / BaseTools / Source / Python / GenFds / FfsFileStatement.py
index 3fd5a9c2158a6f7d3e20779d9cb2312a53432ccd..ba8e0465ef34721defca9355978dba5df7cc2691 100644 (file)
@@ -1,7 +1,7 @@
 ## @file\r
 # process FFS generation from FILE statement\r
 #\r
-#  Copyright (c) 2007 - 2017, Intel Corporation. All rights reserved.<BR>\r
+#  Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR>\r
 #\r
 #  This program and the accompanying materials\r
 #  are licensed and made available under the terms and conditions of the BSD License\r
@@ -83,14 +83,14 @@ class FileStatement (FileStatementClassObject) :
         SectionAlignments = None\r
         if self.FvName is not None :\r
             Buffer = StringIO.StringIO('')\r
-            if self.FvName.upper() not in GenFdsGlobalVariable.FdfParser.Profile.FvDict.keys():\r
+            if self.FvName.upper() not in GenFdsGlobalVariable.FdfParser.Profile.FvDict:\r
                 EdkLogger.error("GenFds", GENFDS_ERROR, "FV (%s) is NOT described in FDF file!" % (self.FvName))\r
             Fv = GenFdsGlobalVariable.FdfParser.Profile.FvDict.get(self.FvName.upper())\r
             FileName = Fv.AddToBuffer(Buffer)\r
             SectionFiles = [FileName]\r
 \r
         elif self.FdName is not None:\r
-            if self.FdName.upper() not in GenFdsGlobalVariable.FdfParser.Profile.FdDict.keys():\r
+            if self.FdName.upper() not in GenFdsGlobalVariable.FdfParser.Profile.FdDict:\r
                 EdkLogger.error("GenFds", GENFDS_ERROR, "FD (%s) is NOT described in FDF file!" % (self.FdName))\r
             Fd = GenFdsGlobalVariable.FdfParser.Profile.FdDict.get(self.FdName.upper())\r
             FileName = Fd.GenFd()\r