# retrieve BPDG tool's path from tool_def.txt according to VPD_TOOL_GUID defined in DSC file.\r
BPDGToolName = None\r
for ToolDef in self.ToolDefinition.values():\r
- if ToolDef.has_key(TAB_GUID) and ToolDef[TAB_GUID] == self.Platform.VpdToolGuid:\r
- if not ToolDef.has_key("PATH"):\r
+ if TAB_GUID in ToolDef and ToolDef[TAB_GUID] == self.Platform.VpdToolGuid:\r
+ if "PATH" not in ToolDef:\r
EdkLogger.error("build", ATTRIBUTE_NOT_AVAILABLE, "PATH attribute was not provided for BPDG guid tool %s in tools_def.txt" % self.Platform.VpdToolGuid)\r
BPDGToolName = ToolDef["PATH"]\r
break\r