Fix build crash when fdf is empty file
Fix https://bugzilla.tianocore.org/show_bug.cgi?id=912
Cc: Liming Gao <liming.gao@intel.com>
Cc: Yonghong Zhu <yonghong.zhu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Yunhua Feng <yunhuax.feng@intel.com>
Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
\r
def __StringToList(self):\r
self.Profile.FileLinesList = [list(s) for s in self.Profile.FileLinesList]\r
+ if not self.Profile.FileLinesList:\r
+ EdkLogger.error('FdfParser', FILE_READ_FAILURE, 'The file is empty!', File=self.FileName)\r
self.Profile.FileLinesList[-1].append(' ')\r
\r
def __ReplaceFragment(self, StartPos, EndPos, Value = ' '):\r