summaryrefslogtreecommitdiff
path: root/BaseTools/Source/Python/UPT/GenMetaFile/GenInfFile.py
diff options
context:
space:
mode:
authorHess Chen <hesheng.chen@intel.com>2014-09-03 08:25:10 +0000
committerhchen30 <hchen30@6f19259b-4bc3-4df7-8a09-765794883524>2014-09-03 08:25:10 +0000
commitcf2b2bdef3d6b5c64b5aa528bb255db81c13d965 (patch)
treebc297730ea79b6e991ad216a8f077d37254b5108 /BaseTools/Source/Python/UPT/GenMetaFile/GenInfFile.py
parentb5fd61fe8c85a8aec09becd851a782631a8a4aeb (diff)
downloadedk2-platforms-cf2b2bdef3d6b5c64b5aa528bb255db81c13d965.tar.xz
BaseTools/UPT: Replace os.linesep with '\r\n' when generating UNI files.
Replace os.linesep with '\r\n' when generating UNI files to make sure all files are under DOS format. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Hess Chen <hesheng.chen@intel.com> Reviewed-by: Gao, Liming <liming.gao@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16041 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'BaseTools/Source/Python/UPT/GenMetaFile/GenInfFile.py')
-rw-r--r--BaseTools/Source/Python/UPT/GenMetaFile/GenInfFile.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/BaseTools/Source/Python/UPT/GenMetaFile/GenInfFile.py b/BaseTools/Source/Python/UPT/GenMetaFile/GenInfFile.py
index 0daa96af25..2a11204f7d 100644
--- a/BaseTools/Source/Python/UPT/GenMetaFile/GenInfFile.py
+++ b/BaseTools/Source/Python/UPT/GenMetaFile/GenInfFile.py
@@ -230,22 +230,22 @@ def GenModuleUNIEncodeFile(ModuleObject, UniFileHeader='', Encoding=DT.TAB_ENCOD
if not os.path.exists(os.path.dirname(ModuleObject.GetFullPath())):
os.makedirs(os.path.dirname(ModuleObject.GetFullPath()))
- Content = UniFileHeader + os.linesep
- Content += DT.END_OF_LINE
+ Content = UniFileHeader + '\r\n'
+ Content += '\r\n'
- Content += FormatUniEntry('#string ' + DT.TAB_INF_ABSTRACT, ModuleObject.GetAbstract(), ContainerFile) + os.linesep
+ Content += FormatUniEntry('#string ' + DT.TAB_INF_ABSTRACT, ModuleObject.GetAbstract(), ContainerFile) + '\r\n'
Content += FormatUniEntry('#string ' + DT.TAB_INF_DESCRIPTION, ModuleObject.GetDescription(), ContainerFile) \
- + os.linesep
+ + '\r\n'
BinaryAbstractString = FormatUniEntry('#string ' + DT.TAB_INF_BINARY_ABSTRACT, BinaryAbstract, ContainerFile)
if BinaryAbstractString:
- Content += BinaryAbstractString + os.linesep
+ Content += BinaryAbstractString + '\r\n'
BinaryDescriptionString = FormatUniEntry('#string ' + DT.TAB_INF_BINARY_DESCRIPTION, BinaryDescription, \
ContainerFile)
if BinaryDescriptionString:
- Content += BinaryDescriptionString + os.linesep
+ Content += BinaryDescriptionString + '\r\n'
if not os.path.exists(ContainerFile):
File = codecs.open(ContainerFile, 'wb', Encoding)