summaryrefslogtreecommitdiffstats
path: root/BaseTools/Source/Python/UPT/GenMetaFile/GenDecFile.py
diff options
context:
space:
mode:
authorYonghong Zhu <yonghong.zhu@intel.com>2018-09-04 10:39:47 +0800
committerYonghong Zhu <yonghong.zhu@intel.com>2018-10-13 09:57:16 +0800
commit1b2e077260030290c512f3ac71a044ed1150899f (patch)
tree4834e04cda1ed358ce20dd24906af28665907e8c /BaseTools/Source/Python/UPT/GenMetaFile/GenDecFile.py
parent9d7e1e56a727743a811abfed92e1ede39ecbfa8c (diff)
downloadedk2-1b2e077260030290c512f3ac71a044ed1150899f.tar.gz
edk2-1b2e077260030290c512f3ac71a044ed1150899f.tar.bz2
edk2-1b2e077260030290c512f3ac71a044ed1150899f.zip
BaseTools/UPT: Porting UPT Tool from Python2 to Python3
Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
Diffstat (limited to 'BaseTools/Source/Python/UPT/GenMetaFile/GenDecFile.py')
-rw-r--r--BaseTools/Source/Python/UPT/GenMetaFile/GenDecFile.py18
1 files changed, 9 insertions, 9 deletions
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