diff options
author | Liming Gao <liming.gao@intel.com> | 2018-07-05 17:40:04 +0800 |
---|---|---|
committer | Liming Gao <liming.gao@intel.com> | 2018-07-09 10:25:47 +0800 |
commit | f7496d717357b9af78414d19679b073403812340 (patch) | |
tree | 67621e65fd181bdf8a12d12e7706579beaaed0fb /BaseTools/Source/Python/UPT/PomAdapter/InfPomAlignment.py | |
parent | 39456d00f36e04b7e7efb208f350f4e83b6c3531 (diff) | |
download | edk2-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/PomAdapter/InfPomAlignment.py')
-rw-r--r-- | BaseTools/Source/Python/UPT/PomAdapter/InfPomAlignment.py | 68 |
1 files changed, 34 insertions, 34 deletions
diff --git a/BaseTools/Source/Python/UPT/PomAdapter/InfPomAlignment.py b/BaseTools/Source/Python/UPT/PomAdapter/InfPomAlignment.py index 84f0d43f01..c055089f2c 100644 --- a/BaseTools/Source/Python/UPT/PomAdapter/InfPomAlignment.py +++ b/BaseTools/Source/Python/UPT/PomAdapter/InfPomAlignment.py @@ -3,9 +3,9 @@ #
# 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,
@@ -59,8 +59,8 @@ from Common.MultipleWorkspace import MultipleWorkspace as mws #
class InfPomAlignment(ModuleObject):
## Construct of InfPomAlignment
- # Skip means that UPT don't care the syntax of INF, this may be the not
- # distributed INF files during creation or the INF files checked for
+ # Skip means that UPT don't care the syntax of INF, this may be the not
+ # distributed INF files during creation or the INF files checked for
# dependency rule during remove.
#
def __init__(self, FileName, WorkSpace=None, PackagePath='', Skip=False):
@@ -90,12 +90,12 @@ class InfPomAlignment(ModuleObject): self._GenInfPomObjects(Skip)
##
- # Generate all POM objects, the original input comes
+ # Generate all POM objects, the original input comes
# from INF parser's output
#
def _GenInfPomObjects(self, Skip):
#
- # Call INF Parser to get information from INF file
+ # Call INF Parser to get information from INF file
#
self.Parser = InfParser.InfParser(self.FileName, self.WorkSpace)
self.FullPath = self.Parser.FullPath
@@ -144,8 +144,8 @@ class InfPomAlignment(ModuleObject): self.SetFileName(self.FileName)
self.SetFullPath(self.FullPath)
#
- # The INF's filename (without the directory path or the extension)
- # must be used for the value of the
+ # The INF's filename (without the directory path or the extension)
+ # must be used for the value of the
# ModuleSurfaceArea.Header.Name element
#
self.SetName(os.path.splitext(os.path.basename(self.FileName))[0])
@@ -184,7 +184,7 @@ class InfPomAlignment(ModuleObject): #
# must exist items in INF define section
- # MODULE_TYPE/BASE_NAME/INF_VERSION/FILE_GUID/VERSION_STRING
+ # MODULE_TYPE/BASE_NAME/INF_VERSION/FILE_GUID/VERSION_STRING
#
if DefineObj.GetModuleType() is None:
Logger.Error("InfParser", FORMAT_INVALID,
@@ -194,7 +194,7 @@ class InfPomAlignment(ModuleObject): ModuleType = DefineObj.GetModuleType().GetValue()
if ModuleType:
#
- # Drivers and applications are not allowed to have a MODULE_TYPE of "BASE". Only
+ # Drivers and applications are not allowed to have a MODULE_TYPE of "BASE". Only
# libraries are permitted to a have a MODULE_TYPE of "BASE".
#
if len(DefineObj.LibraryClass) == 0 and ModuleType == 'BASE':
@@ -248,7 +248,7 @@ class InfPomAlignment(ModuleObject): Logger.Error("Parser", PARSER_ERROR, ST.ERR_INF_PARSER_NOT_SUPPORT_EDKI_INF, ExtraData=self.FullPath,
RaiseError=Logger.IS_RAISE_ERROR)
#
- # if there is Shadow, Should judge the MODULE_TYPE in
+ # if there is Shadow, Should judge the MODULE_TYPE in
# SEC, PEI_CORE and PEIM
#
if DefineObj.GetShadow():
@@ -283,7 +283,7 @@ class InfPomAlignment(ModuleObject): self._GenSpecialComments()
#
# put all define statement into user-extension sections
- #
+ #
DefinesDictNew = GenModuleHeaderUserExt(DefineObj, ArchString)
if DefinesDictNew:
UserExtension = CommonObject.UserExtensionObject()
@@ -293,7 +293,7 @@ class InfPomAlignment(ModuleObject): self.SetUserExtensionList(self.GetUserExtensionList() + [UserExtension])
#
# Get all meta-file header information
- # the record is list of items formated:
+ # the record is list of items formated:
# [LineValue, Arch, StartLine, ID, Third]
#
InfHeaderObj = self.Parser.InfHeader
@@ -356,13 +356,13 @@ class InfPomAlignment(ModuleObject): self.SetExternList(self.GetExternList() + [Image])
#
# UNLOAD_IMAGE
- #
+ #
UnloadImageList = DefineObj.GetUnloadImages()
for UnloadImage in UnloadImageList:
Image = ExternObject()
#
# Future enhancement
- #
+ #
Image.SetUnloadImage(UnloadImage.GetCName())
self.SetExternList(self.GetExternList() + [Image])
#
@@ -373,7 +373,7 @@ class InfPomAlignment(ModuleObject): Image = ExternObject()
#
# Future enhancement
- #
+ #
Image.SetConstructor(ConstructorItem.GetCName())
self.SetExternList(self.GetExternList() + [Image])
#
@@ -384,7 +384,7 @@ class InfPomAlignment(ModuleObject): Image = ExternObject()
#
# Future enhancement
- #
+ #
Image.SetDestructor(DestructorItem.GetCName())
self.SetExternList(self.GetExternList() + [Image])
@@ -639,7 +639,7 @@ class InfPomAlignment(ModuleObject): UserExtension = CommonObject.UserExtensionObject()
UserId = UserExtensionDataObj.GetUserId()
if UserId.startswith('"') and UserId.endswith('"'):
- UserId = UserId[1:-1]
+ UserId = UserId[1:-1]
UserExtension.SetUserID(UserId)
Identifier = UserExtensionDataObj.GetIdString()
if Identifier.startswith('"') and Identifier.endswith('"'):
@@ -653,11 +653,11 @@ class InfPomAlignment(ModuleObject): UserExtension.SetStatement(UserExtensionDataObj.GetContent())
UserExtension.SetSupArchList(ConvertArchList(UserExtensionDataObj.GetSupArchList()))
self.SetUserExtensionList(self.GetUserExtensionList() + [UserExtension])
-
+
#
# Gen UserExtensions of TianoCore."BinaryHeader"
#
-
+
#Get Binary header from INF file
BinaryAbstractList = self.BinaryHeaderAbstractList
BinaryDescriptionList = self.BinaryHeaderDescriptionList
@@ -684,7 +684,7 @@ class InfPomAlignment(ModuleObject): BinaryUserExtension.SetIdentifier(DT.TAB_BINARY_HEADER_IDENTIFIER)
BinaryUserExtension.SetUserID(DT.TAB_BINARY_HEADER_USERID)
self.SetUserExtensionList(self.GetUserExtensionList() + [BinaryUserExtension])
-
+
def _GenDepexesList(self, SmmDepexList, DxeDepexList, PeiDepexList):
if SmmDepexList:
self.SetSmmDepex(SmmDepexList)
@@ -802,7 +802,7 @@ class InfPomAlignment(ModuleObject): BinaryData = BinaryObj.keys()
#
- # If the INF file does not contain a [Sources] section, and the INF file does contain a [Binaries] section,
+ # If the INF file does not contain a [Sources] section, and the INF file does contain a [Binaries] section,
# then the ModuleSurfaceArea.BinaryModule attribute must be set to true. Otherwise, do not use the attribute
#
if BinaryObj and not self.Parser.InfSourcesSection.GetSources():
@@ -827,7 +827,7 @@ class InfPomAlignment(ModuleObject): #
# BuildOption AsBuild Info
- #
+ #
for BuildOptionItem in self.Parser.InfBuildOptionSection.GetBuildOptions():
AsBuildBuildOptionList.append(BuildOptionItem)
AsBuildIns.SetBuildFlagsList(AsBuildBuildOptionList)
@@ -849,14 +849,14 @@ class InfPomAlignment(ModuleObject): TempPath = ModulePath
ModulePath = os.path.dirname(ModulePath)
PackageName = TempPath
- DecFilePath = os.path.normpath(os.path.join(WorkSpace, PackageName))
+ DecFilePath = os.path.normpath(os.path.join(WorkSpace, PackageName))
if DecFilePath:
for File in os.listdir(DecFilePath):
if File.upper().endswith('.DEC'):
DecFileFullPath = os.path.normpath(os.path.join(DecFilePath, File))
DecObjList.append(DecPomAlignment(DecFileFullPath, self.WorkSpace))
-
-
+
+
BinariesDict, AsBuildIns, BinaryFileObjectList = GenBinaryData(BinaryData, BinaryObj,
BinariesDict,
AsBuildIns,
@@ -864,7 +864,7 @@ class InfPomAlignment(ModuleObject): self.GetSupArchList(),
self.BinaryModule,
DecObjList)
-
+
BinariesDict2 = {}
for Key in BinariesDict:
ValueList = BinariesDict[Key]
@@ -872,7 +872,7 @@ class InfPomAlignment(ModuleObject): BinariesDict2[Key] = ValueList
else:
#
- # if there is no TagName, ToolCode, HelpStr,
+ # if there is no TagName, ToolCode, HelpStr,
# then do not need to put them into userextension
#
(Target, Family, TagName, HelpStr) = ValueList[0]
@@ -1000,7 +1000,7 @@ class InfPomAlignment(ModuleObject): HelpTxtTailObj.SetLang(DT.TAB_LANGUAGE_EN_X)
HelpTxtTailObj.SetString(HelpString)
ListObject.SetHelpTextList([HelpTxtTailObj])
-
+
GuidProtocolPpiList.append(ListObject)
elif Type == DT.TAB_PROTOCOLS:
ProtocolData = ProtocolObj.keys()
@@ -1068,10 +1068,10 @@ class InfPomAlignment(ModuleObject): FileObj.SetURI(FileName)
MiscFileObj.SetFileList(MiscFileObj.GetFileList()+[FileObj])
else:
- Logger.Error("InfParser",
+ Logger.Error("InfParser",
FORMAT_INVALID,
ST.ERR_INF_PARSER_FILE_NOT_EXIST_OR_NAME_INVALID%(Line),
File=GlobalData.gINF_MODULE_NAME,
- ExtraData=Line)
- self.SetMiscFileList(self.GetMiscFileList()+[MiscFileObj])
-
+ ExtraData=Line)
+ self.SetMiscFileList(self.GetMiscFileList()+[MiscFileObj])
+
|