]> git.proxmox.com Git - mirror_edk2.git/blobdiff - BaseTools/Source/Python/GenFds/Fd.py
BaseTools: remove redundant if comparison
[mirror_edk2.git] / BaseTools / Source / Python / GenFds / Fd.py
index f735d3b5b015bc679c6b0fc8a3dfed895d1870f9..188ca28cd7ce2a751d741bbca4664fe1b9acad9a 100644 (file)
@@ -1,7 +1,7 @@
 ## @file\r
 # process FD generation\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
@@ -27,6 +27,7 @@ from Common import EdkLogger
 from Common.BuildToolError import *\r
 from Common.Misc import SaveFileOnChange\r
 from GenFds import GenFds\r
+from Common.DataType import BINARY_FILE_TYPE_FV\r
 \r
 ## generate FD\r
 #\r
@@ -46,7 +47,7 @@ class FD(FDClassObject):
     #   @retval string      Generated FD file name\r
     #\r
     def GenFd (self, Flag = False):\r
-        if self.FdUiName.upper() + 'fd' in GenFds.ImageBinDict.keys():\r
+        if self.FdUiName.upper() + 'fd' in GenFds.ImageBinDict:\r
             return GenFds.ImageBinDict[self.FdUiName.upper() + 'fd']\r
 \r
         #\r
@@ -158,7 +159,7 @@ class FD(FDClassObject):
         FvAddDict ={}\r
         FvList = []\r
         for RegionObj in self.RegionList:\r
-            if RegionObj.RegionType == 'FV':\r
+            if RegionObj.RegionType == BINARY_FILE_TYPE_FV:\r
                 if len(RegionObj.RegionDataList) == 1:\r
                     RegionData = RegionObj.RegionDataList[0]\r
                     FvList.append(RegionData.upper())\r