## @file\r
# This file is used to parse a xml file of .PKG file\r
#\r
-# Copyright (c) 2011 - 2014, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>\r
#\r
-# This program and the accompanying materials are licensed and made available \r
-# under the terms and conditions of the BSD License which accompanies this \r
-# distribution. The full text of the license may be found at \r
+# This program and the accompanying materials are licensed and made available\r
+# under the terms and conditions of the BSD License which accompanies this\r
+# distribution. The full text of the license may be found at\r
# http://opensource.org/licenses/bsd-license.php\r
#\r
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
import Logger.Log as Logger\r
\r
## ConvertVariableName()\r
-# Convert VariableName to be L"string", \r
+# Convert VariableName to be L"string",\r
# input of UCS-2 format Hex Array or L"string" (C style.) could be converted successfully,\r
# others will not.\r
#\r
def ConvertVariableName(VariableName):\r
VariableName = VariableName.strip()\r
#\r
- # check for L quoted string \r
+ # check for L quoted string\r
#\r
if VariableName.startswith('L"') and VariableName.endswith('"'):\r
return VariableName\r
- \r
+\r
#\r
# check for Hex Array, it should be little endian even number of hex numbers\r
#\r
SecondByte = int(ValueList[Index + 1], 16)\r
if SecondByte != 0:\r
return None\r
- \r
- if FirstByte not in xrange(0x20, 0x7F):\r
+\r
+ if FirstByte not in range(0x20, 0x7F):\r
return None\r
TransferedStr += ('%c')%FirstByte\r
Index = Index + 2\r
## IsRequiredItemListNull\r
#\r
# Check if a required XML section item/attribue is NULL\r
-# \r
+#\r
# @param ItemList: The list of items to be checked\r
# @param XmlTreeLevel: The error message tree level\r
-# \r
+#\r
def IsRequiredItemListNull(ItemDict, XmlTreeLevel):\r
for Key in ItemDict:\r
if not ItemDict[Key]:\r
ErrorMsg = ERR_XML_PARSER_REQUIRED_ITEM_MISSING % (Key, Msg)\r
Logger.Error('\nUPT', PARSER_ERROR, ErrorMsg, RaiseError=True)\r
\r
-## Get help text \r
+## Get help text\r
#\r
# @param HelpText\r
#\r
HelpTextObj.SetString(HelT.HelpText)\r
HelpTextList.append(HelpTextObj)\r
return HelpTextList\r
- \r
-## Get Prompt text \r
+\r
+## Get Prompt text\r
#\r
# @param Prompt\r
#\r