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>
fsock = open(FileName, "rb", 0)\r
try:\r
self.FileLinesList = fsock.readlines()\r
+ for index, line in enumerate(self.FileLinesList):\r
+ if not line.endswith('\n'):\r
+ self.FileLinesList[index] += '\n'\r
+\r
finally:\r
fsock.close()\r
\r