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
@ -155,7 +155,7 @@ class IncludeFileProfile :
|
||||
self.FileName = FileName
|
||||
self.FileLinesList = []
|
||||
try:
|
||||
fsock = open(FileName, "rb", 0)
|
||||
fsock = open(FileName, "r")
|
||||
try:
|
||||
self.FileLinesList = fsock.readlines()
|
||||
for index, line in enumerate(self.FileLinesList):
|
||||
@ -216,7 +216,7 @@ class FileProfile :
|
||||
def __init__(self, FileName):
|
||||
self.FileLinesList = []
|
||||
try:
|
||||
fsock = open(FileName, "rb", 0)
|
||||
fsock = open(FileName, "r")
|
||||
try:
|
||||
self.FileLinesList = fsock.readlines()
|
||||
finally:
|
||||
|
Reference in New Issue
Block a user