BaseTools: Various typo

Various typo in BaseTools.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Coeur <coeur@gmx.fr>
Reviewed-by: Liming Gao <liming.gao@intel.com>
This commit is contained in:
Antoine Coeur
2019-02-06 15:44:39 +08:00
committed by Liming Gao
parent 325ad62260
commit fb0b35e05f
172 changed files with 510 additions and 515 deletions

View File

@@ -1,5 +1,5 @@
## @file
# Standardized Error Hanlding infrastructures.
# Standardized Error Handling infrastructures.
#
# Copyright (c) 2007 - 2016, Intel Corporation. All rights reserved.<BR>
# This program and the accompanying materials

View File

@@ -145,7 +145,7 @@ def warn(ToolName, Message, File=None, Line=None, ExtraData=None):
_InfoLogger.log(WARN, LogText)
# Raise an execption if indicated
# Raise an exception if indicated
if _WarningAsError == True:
raise FatalError(WARNING_AS_ERROR)
@@ -155,7 +155,7 @@ info = _InfoLogger.info
## Log ERROR message
#
# Once an error messages is logged, the tool's execution will be broken by raising
# an execption. If you don't want to break the execution later, you can give
# an exception. If you don't want to break the execution later, you can give
# "RaiseError" with "False" value.
#
# @param ToolName The name of the tool. If not given, the name of caller
@@ -165,7 +165,7 @@ info = _InfoLogger.info
# @param File The name of file which caused the error.
# @param Line The line number in the "File" which caused the warning.
# @param ExtraData More information associated with "Message"
# @param RaiseError Raise an exception to break the tool's executuion if
# @param RaiseError Raise an exception to break the tool's execution if
# it's True. This is the default behavior.
#
def error(ToolName, ErrorCode, Message=None, File=None, Line=None, ExtraData=None, RaiseError=IsRaiseError):

View File

@@ -775,10 +775,10 @@ class Progressor:
## Constructor
#
# @param OpenMessage The string printed before progress charaters
# @param CloseMessage The string printed after progress charaters
# @param ProgressChar The charater used to indicate the progress
# @param Interval The interval in seconds between two progress charaters
# @param OpenMessage The string printed before progress characters
# @param CloseMessage The string printed after progress characters
# @param ProgressChar The character used to indicate the progress
# @param Interval The interval in seconds between two progress characters
#
def __init__(self, OpenMessage="", CloseMessage="", ProgressChar='.', Interval=1.0):
self.PromptMessage = OpenMessage
@@ -788,9 +788,9 @@ class Progressor:
if Progressor._StopFlag is None:
Progressor._StopFlag = threading.Event()
## Start to print progress charater
## Start to print progress character
#
# @param OpenMessage The string printed before progress charaters
# @param OpenMessage The string printed before progress characters
#
def Start(self, OpenMessage=None):
if OpenMessage is not None:
@@ -801,9 +801,9 @@ class Progressor:
Progressor._ProgressThread.setDaemon(False)
Progressor._ProgressThread.start()
## Stop printing progress charater
## Stop printing progress character
#
# @param CloseMessage The string printed after progress charaters
# @param CloseMessage The string printed after progress characters
#
def Stop(self, CloseMessage=None):
OriginalCodaMessage = self.CodaMessage
@@ -1422,7 +1422,7 @@ class PathClass(object):
## Override __cmp__ function
#
# Customize the comparsion operation of two PathClass
# Customize the comparison operation of two PathClass
#
# @retval 0 The two PathClass are different
# @retval -1 The first PathClass is less than the second PathClass
@@ -1517,7 +1517,7 @@ class PathClass(object):
self.Path = os.path.join(RealRoot, RealFile)
return ErrorCode, ErrorInfo
## Parse PE image to get the required PE informaion.
## Parse PE image to get the required PE information.
#
class PeImageClass():
## Constructor

View File

@@ -24,7 +24,7 @@ from Common.DataType import TAB_WORKSPACE
# @param class:
#
# @var WORKSPACE: defined the current WORKSPACE
# @var PACKAGES_PATH: defined the other WORKSAPCE, if current WORKSPACE is invalid, search valid WORKSPACE from PACKAGES_PATH
# @var PACKAGES_PATH: defined the other WORKSPACE, if current WORKSPACE is invalid, search valid WORKSPACE from PACKAGES_PATH
#
class MultipleWorkspace(object):
WORKSPACE = ''
@@ -146,7 +146,7 @@ class MultipleWorkspace(object):
## getPkgPath()
#
# get all package pathes.
# get all package paths.
#
# @param cls The class pointer
#

View File

@@ -36,7 +36,7 @@ def ParseDefineMacro2(Table, RecordSets, GlobalMacro):
Macros[Record[0]] = Record[1]
#
# Overrided by Global Macros
# Overridden by Global Macros
#
Macros.update(GlobalMacro)
@@ -76,7 +76,7 @@ def ParseDefineMacro(Table, GlobalMacro):
Macros[Record[0]] = Record[1]
#
# Overrided by Global Macros
# Overridden by Global Macros
#
Macros.update(GlobalMacro)
@@ -830,7 +830,7 @@ def InsertSectionItems(Model, CurrentSection, SectionItemList, ArchList, ThirdLi
# @param Table: The Table to be inserted
# @param FileID: The ID of belonging file
# @param Filename: The name of belonging file
# @param CurrentSection: The name of currect section
# @param CurrentSection: The name of current section
# @param SectionItemList: A list of items of the section
# @param ArchList: A list of arches
# @param ThirdList: A list of third parameters, ModuleType for LibraryClass and SkuId for Dynamic Pcds

View File

@@ -290,7 +290,7 @@ class RangeExpression(BaseExpression):
return rangeid
def NegtiveRange(self, Oprand1):
def NegativeRange(self, Oprand1):
rangeContainer1 = self.operanddict[Oprand1]
@@ -332,7 +332,7 @@ class RangeExpression(BaseExpression):
if Operator in ["!", "NOT", "not"]:
if not gGuidPattern.match(Oprand1.strip()):
raise BadExpression(ERR_STRING_EXPR % Operator)
return self.NegtiveRange(Oprand1)
return self.NegativeRange(Oprand1)
else:
if Operator in ["==", ">=", "<=", ">", "<", '^']:
return self.EvalRange(Operator, Oprand1)

View File

@@ -32,7 +32,7 @@ gHumanReadableVerPatt = re.compile(r'([1-9][0-9]*|0)\.[0-9]{1,2}$')
## GetSplitValueList
#
# Get a value list from a string with multiple values splited with SplitTag
# Get a value list from a string with multiple values split with SplitTag
# The default SplitTag is DataType.TAB_VALUE_SPLIT
# 'AAA|BBB|CCC' -> ['AAA', 'BBB', 'CCC']
#
@@ -88,7 +88,7 @@ def GetSplitValueList(String, SplitTag=DataType.TAB_VALUE_SPLIT, MaxSplit= -1):
## GetSplitList
#
# Get a value list from a string with multiple values splited with SplitString
# Get a value list from a string with multiple values split with SplitString
# The default SplitTag is DataType.TAB_VALUE_SPLIT
# 'AAA|BBB|CCC' -> ['AAA', 'BBB', 'CCC']
#
@@ -123,7 +123,7 @@ def MergeArches(Dict, Key, Arch):
# Return False if invalid format
#
# @param String: String with DEFINE statement
# @param Arch: Supportted Arch
# @param Arch: Supported Arch
# @param Defines: DEFINE statement to be parsed
#
# @retval 0 DEFINE statement found, and valid
@@ -149,7 +149,7 @@ def GenDefines(String, Arch, Defines):
#
# @param String: String with INCLUDE statement
# @param IncludeFiles: INCLUDE statement to be parsed
# @param Arch: Supportted Arch
# @param Arch: Supported Arch
#
# @retval True
# @retval False
@@ -297,7 +297,7 @@ def ReplaceMacro(String, MacroDefinitions={}, SelfReplacement=False, RaiseError=
## NormPath
#
# Create a normal path
# And replace DFEINE in the path
# And replace DEFINE in the path
#
# @param Path: The input value for Path to be converted
# @param Defines: A set for DEFINE statement
@@ -730,9 +730,9 @@ def WorkspaceFile(WorkspaceDir, Filename):
## Split string
#
# Revmove '"' which startswith and endswith string
# Remove '"' which startswith and endswith string
#
# @param String: The string need to be splited
# @param String: The string need to be split
#
# @retval String: The string after removed '""'
#