diff options
author | Yunhua Feng <yunhuax.feng@intel.com> | 2017-06-28 18:29:18 +0800 |
---|---|---|
committer | Yonghong Zhu <yonghong.zhu@intel.com> | 2017-07-10 09:59:16 +0800 |
commit | 47a29bc7072b20d465ccfd634b74121a67368c4f (patch) | |
tree | 16dd9871997ff9eecfc3a35928ed9c537a0edb84 | |
parent | bc0d7233925e82ddb8423532b2b90a3ad1ef1e49 (diff) | |
download | edk2-47a29bc7072b20d465ccfd634b74121a67368c4f.tar.gz edk2-47a29bc7072b20d465ccfd634b74121a67368c4f.tar.bz2 edk2-47a29bc7072b20d465ccfd634b74121a67368c4f.zip |
BaseTools: Fix FDF file parse !include file issue
when FDF file use "!include" format to include the other file,
and the end line of the file not end with '\n', the include
file parse error.
Cc: Liming Gao <liming.gao@intel.com>
Cc: Yonghong Zhu <yonghong.zhu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Yunhua Feng <yunhuax.feng@intel.com>
Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
-rw-r--r-- | BaseTools/Source/Python/GenFds/FdfParser.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/BaseTools/Source/Python/GenFds/FdfParser.py b/BaseTools/Source/Python/GenFds/FdfParser.py index 2782be4b98..8f49f9faad 100644 --- a/BaseTools/Source/Python/GenFds/FdfParser.py +++ b/BaseTools/Source/Python/GenFds/FdfParser.py @@ -167,6 +167,10 @@ class IncludeFileProfile : fsock = open(FileName, "rb", 0)
try:
self.FileLinesList = fsock.readlines()
+ for index, line in enumerate(self.FileLinesList):
+ if not line.endswith('\n'):
+ self.FileLinesList[index] += '\n'
+
finally:
fsock.close()
|