]> git.proxmox.com Git - mirror_edk2.git/blobdiff - BaseTools/Source/Python/GenFds/CapsuleData.py
BaseTools: refactor and remove un-needed use of .keys() on dictionaries
[mirror_edk2.git] / BaseTools / Source / Python / GenFds / CapsuleData.py
index 5b806d9e44825a6a1a4d20cd05cbc365f9e73004..b376d6b2e9be560a4f0cf71043a1576ab99c65ae 100644 (file)
@@ -1,7 +1,7 @@
 ## @file\r
 # generate capsule\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
@@ -80,8 +80,8 @@ class CapsuleFv (CapsuleData):
     #\r
     def GenCapsuleSubItem(self):\r
         if self.FvName.find('.fv') == -1:\r
-            if self.FvName.upper() in GenFdsGlobalVariable.FdfParser.Profile.FvDict.keys():\r
-                FvObj = GenFdsGlobalVariable.FdfParser.Profile.FvDict.get(self.FvName.upper())\r
+            if self.FvName.upper() in GenFdsGlobalVariable.FdfParser.Profile.FvDict:\r
+                FvObj = GenFdsGlobalVariable.FdfParser.Profile.FvDict[self.FvName.upper()]\r
                 FdBuffer = StringIO.StringIO('')\r
                 FvObj.CapsuleName = self.CapsuleName\r
                 FvFile = FvObj.AddToBuffer(FdBuffer)\r
@@ -112,8 +112,8 @@ class CapsuleFd (CapsuleData):
     #\r
     def GenCapsuleSubItem(self):\r
         if self.FdName.find('.fd') == -1:\r
-            if self.FdName.upper() in GenFdsGlobalVariable.FdfParser.Profile.FdDict.keys():\r
-                FdObj = GenFdsGlobalVariable.FdfParser.Profile.FdDict.get(self.FdName.upper())\r
+            if self.FdName.upper() in GenFdsGlobalVariable.FdfParser.Profile.FdDict:\r
+                FdObj = GenFdsGlobalVariable.FdfParser.Profile.FdDict[self.FdName.upper()]\r
                 FdFile = FdObj.GenFd()\r
                 return FdFile\r
         else:\r