BaseTools: fix the open file's read and write bugs
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: Liming Gao <liming.gao@intel.com>
This commit is contained in:
committed by
Yonghong Zhu
parent
fe3991d635
commit
a09f4c91f7
@ -634,7 +634,7 @@ class ModuleReport(object):
|
||||
FwReportFileName = os.path.join(self._BuildDir, "DEBUG", self.ModuleName + ".txt")
|
||||
if os.path.isfile(FwReportFileName):
|
||||
try:
|
||||
FileContents = open(FwReportFileName).read()
|
||||
FileContents = open(FwReportFileName, 'r').read()
|
||||
Match = gModuleSizePattern.search(FileContents)
|
||||
if Match:
|
||||
self.Size = int(Match.group(1))
|
||||
|
Reference in New Issue
Block a user