From 1b2e077260030290c512f3ac71a044ed1150899f Mon Sep 17 00:00:00 2001 From: Yonghong Zhu Date: Tue, 4 Sep 2018 10:39:47 +0800 Subject: BaseTools/UPT: Porting UPT Tool from Python2 to Python3 Cc: Liming Gao Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Yonghong Zhu Reviewed-by: Liming Gao --- BaseTools/Source/Python/UPT/GenMetaFile/GenDecFile.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'BaseTools/Source/Python/UPT/GenMetaFile/GenDecFile.py') diff --git a/BaseTools/Source/Python/UPT/GenMetaFile/GenDecFile.py b/BaseTools/Source/Python/UPT/GenMetaFile/GenDecFile.py index e2dd6a02dc..a377dce9d9 100644 --- a/BaseTools/Source/Python/UPT/GenMetaFile/GenDecFile.py +++ b/BaseTools/Source/Python/UPT/GenMetaFile/GenDecFile.py @@ -585,17 +585,17 @@ def GenPackageUNIEncodeFile(PackageObject, UniFileHeader = '', Encoding=TAB_ENCO ContainerFile = GetUniFileName(os.path.dirname(PackageObject.GetFullPath()), PackageObject.GetBaseName()) - Content = UniFileHeader + '\r\n' - Content += '\r\n' + Content = UniFileHeader + '\n' + Content += '\n' - Content += FormatUniEntry('#string ' + TAB_DEC_PACKAGE_ABSTRACT, PackageObject.GetAbstract(), ContainerFile) + '\r\n' + Content += FormatUniEntry('#string ' + TAB_DEC_PACKAGE_ABSTRACT, PackageObject.GetAbstract(), ContainerFile) + '\n' Content += FormatUniEntry('#string ' + TAB_DEC_PACKAGE_DESCRIPTION, PackageObject.GetDescription(), ContainerFile) \ - + '\r\n' + + '\n' - Content += FormatUniEntry('#string ' + TAB_DEC_BINARY_ABSTRACT, BinaryAbstract, ContainerFile) + '\r\n' + Content += FormatUniEntry('#string ' + TAB_DEC_BINARY_ABSTRACT, BinaryAbstract, ContainerFile) + '\n' - Content += FormatUniEntry('#string ' + TAB_DEC_BINARY_DESCRIPTION, BinaryDescription, ContainerFile) + '\r\n' + Content += FormatUniEntry('#string ' + TAB_DEC_BINARY_DESCRIPTION, BinaryDescription, ContainerFile) + '\n' PromptGenList = [] HelpTextGenList = [] @@ -612,7 +612,7 @@ def GenPackageUNIEncodeFile(PackageObject, UniFileHeader = '', Encoding=TAB_ENCO if (PcdPromptStrName, Lang) not in PromptGenList: TokenValueList.append((Lang, PromptStr)) PromptGenList.append((PcdPromptStrName, Lang)) - PromptString = FormatUniEntry(PcdPromptStrName, TokenValueList, ContainerFile) + '\r\n' + PromptString = FormatUniEntry(PcdPromptStrName, TokenValueList, ContainerFile) + '\n' if PromptString not in Content: Content += PromptString @@ -628,7 +628,7 @@ def GenPackageUNIEncodeFile(PackageObject, UniFileHeader = '', Encoding=TAB_ENCO if (PcdHelpStrName, Lang) not in HelpTextGenList: TokenValueList.append((Lang, HelpStr)) HelpTextGenList.append((PcdHelpStrName, Lang)) - HelpTextString = FormatUniEntry(PcdHelpStrName, TokenValueList, ContainerFile) + '\r\n' + HelpTextString = FormatUniEntry(PcdHelpStrName, TokenValueList, ContainerFile) + '\n' if HelpTextString not in Content: Content += HelpTextString @@ -639,7 +639,7 @@ def GenPackageUNIEncodeFile(PackageObject, UniFileHeader = '', Encoding=TAB_ENCO PcdErrStrName = '#string ' + TAB_STR_TOKENCNAME + TAB_UNDERLINE_SPLIT + Pcd.GetTokenSpaceGuidCName() \ + TAB_UNDERLINE_SPLIT + TAB_STR_TOKENERR \ + TAB_UNDERLINE_SPLIT + ErrorNo[2:] - PcdErrString = FormatUniEntry(PcdErrStrName, PcdError.GetErrorMessageList(), ContainerFile) + '\r\n' + PcdErrString = FormatUniEntry(PcdErrStrName, PcdError.GetErrorMessageList(), ContainerFile) + '\n' if PcdErrString not in Content: Content += PcdErrString -- cgit v1.2.3