summaryrefslogtreecommitdiffstats
path: root/BaseTools/Source/Python/UPT/Xml/XmlParserMisc.py
diff options
context:
space:
mode:
authorLiming Gao <liming.gao@intel.com>2018-07-05 17:40:04 +0800
committerLiming Gao <liming.gao@intel.com>2018-07-09 10:25:47 +0800
commitf7496d717357b9af78414d19679b073403812340 (patch)
tree67621e65fd181bdf8a12d12e7706579beaaed0fb /BaseTools/Source/Python/UPT/Xml/XmlParserMisc.py
parent39456d00f36e04b7e7efb208f350f4e83b6c3531 (diff)
downloadedk2-f7496d717357b9af78414d19679b073403812340.tar.gz
edk2-f7496d717357b9af78414d19679b073403812340.tar.bz2
edk2-f7496d717357b9af78414d19679b073403812340.zip
BaseTools: Clean up source files
1. Do not use tab characters 2. No trailing white space in one line 3. All files must end with CRLF Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Liming Gao <liming.gao@intel.com> Cc: Yonghong Zhu <yonghong.zhu@intel.com> Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
Diffstat (limited to 'BaseTools/Source/Python/UPT/Xml/XmlParserMisc.py')
-rw-r--r--BaseTools/Source/Python/UPT/Xml/XmlParserMisc.py26
1 files changed, 13 insertions, 13 deletions
diff --git a/BaseTools/Source/Python/UPT/Xml/XmlParserMisc.py b/BaseTools/Source/Python/UPT/Xml/XmlParserMisc.py
index 7e3dc94edf..d170761aad 100644
--- a/BaseTools/Source/Python/UPT/Xml/XmlParserMisc.py
+++ b/BaseTools/Source/Python/UPT/Xml/XmlParserMisc.py
@@ -1,11 +1,11 @@
## @file
# This file is used to parse a xml file of .PKG file
#
-# Copyright (c) 2011 - 2014, Intel Corporation. All rights reserved.<BR>
+# Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>
#
-# This program and the accompanying materials are licensed and made available
-# under the terms and conditions of the BSD License which accompanies this
-# distribution. The full text of the license may be found at
+# This program and the accompanying materials are licensed and made available
+# under the terms and conditions of the BSD License which accompanies this
+# distribution. The full text of the license may be found at
# http://opensource.org/licenses/bsd-license.php
#
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
@@ -21,7 +21,7 @@ from Logger.ToolError import PARSER_ERROR
import Logger.Log as Logger
## ConvertVariableName()
-# Convert VariableName to be L"string",
+# Convert VariableName to be L"string",
# input of UCS-2 format Hex Array or L"string" (C style.) could be converted successfully,
# others will not.
#
@@ -31,11 +31,11 @@ import Logger.Log as Logger
def ConvertVariableName(VariableName):
VariableName = VariableName.strip()
#
- # check for L quoted string
+ # check for L quoted string
#
if VariableName.startswith('L"') and VariableName.endswith('"'):
return VariableName
-
+
#
# check for Hex Array, it should be little endian even number of hex numbers
#
@@ -52,7 +52,7 @@ def ConvertVariableName(VariableName):
SecondByte = int(ValueList[Index + 1], 16)
if SecondByte != 0:
return None
-
+
if FirstByte not in xrange(0x20, 0x7F):
return None
TransferedStr += ('%c')%FirstByte
@@ -63,10 +63,10 @@ def ConvertVariableName(VariableName):
## IsRequiredItemListNull
#
# Check if a required XML section item/attribue is NULL
-#
+#
# @param ItemList: The list of items to be checked
# @param XmlTreeLevel: The error message tree level
-#
+#
def IsRequiredItemListNull(ItemDict, XmlTreeLevel):
for Key in ItemDict:
if not ItemDict[Key]:
@@ -74,7 +74,7 @@ def IsRequiredItemListNull(ItemDict, XmlTreeLevel):
ErrorMsg = ERR_XML_PARSER_REQUIRED_ITEM_MISSING % (Key, Msg)
Logger.Error('\nUPT', PARSER_ERROR, ErrorMsg, RaiseError=True)
-## Get help text
+## Get help text
#
# @param HelpText
#
@@ -86,8 +86,8 @@ def GetHelpTextList(HelpText):
HelpTextObj.SetString(HelT.HelpText)
HelpTextList.append(HelpTextObj)
return HelpTextList
-
-## Get Prompt text
+
+## Get Prompt text
#
# @param Prompt
#