## @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
if not os.path.isabs(fmp.ImageFile):\r
CapInputFile = os.path.join(GenFdsGlobalVariable.WorkSpaceDir, fmp.ImageFile)\r
CapOutputTmp = os.path.join(GenFdsGlobalVariable.FvDir, self.UiCapsuleName) + '.tmp'\r
- if ExternalTool == None:\r
+ if ExternalTool is None:\r
EdkLogger.error("GenFds", GENFDS_ERROR, "No tool found with GUID %s" % fmp.Certificate_Guid)\r
else:\r
CmdOption += ExternalTool\r
# @retval string Generated Capsule file path\r
#\r
def GenCapsule(self):\r
- if self.UiCapsuleName.upper() + 'cap' in GenFds.ImageBinDict.keys():\r
+ if self.UiCapsuleName.upper() + 'cap' in GenFds.ImageBinDict:\r
return GenFds.ImageBinDict[self.UiCapsuleName.upper() + 'cap']\r
\r
GenFdsGlobalVariable.InfLogger( "\nGenerate %s Capsule" %self.UiCapsuleName)\r
\r
CapInfFile.writelines("[options]" + T_CHAR_LF)\r
\r
- for Item in self.TokensDict.keys():\r
+ for Item in self.TokensDict:\r
CapInfFile.writelines("EFI_" + \\r
Item + \\r
' = ' + \\r
- self.TokensDict.get(Item) + \\r
+ self.TokensDict[Item] + \\r
T_CHAR_LF)\r
\r
return CapInfFile\r