diff options
author | Yunhua Feng <yunhuax.feng@intel.com> | 2018-07-27 16:02:05 +0800 |
---|---|---|
committer | Yonghong Zhu <yonghong.zhu@intel.com> | 2018-10-13 09:50:45 +0800 |
commit | a09f4c91f785e36f0987aa3a6d7656ba51e6aeda (patch) | |
tree | 0a644e4b34f4fceb65d10465dbb6688fcddddfa5 /BaseTools/Source/Python/BPDG/GenVpd.py | |
parent | fe3991d63552f2eb25ff728a81a6976a3b1f652b (diff) | |
download | edk2-a09f4c91f785e36f0987aa3a6d7656ba51e6aeda.tar.gz edk2-a09f4c91f785e36f0987aa3a6d7656ba51e6aeda.tar.bz2 edk2-a09f4c91f785e36f0987aa3a6d7656ba51e6aeda.zip |
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>
Diffstat (limited to 'BaseTools/Source/Python/BPDG/GenVpd.py')
-rw-r--r-- | BaseTools/Source/Python/BPDG/GenVpd.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/BaseTools/Source/Python/BPDG/GenVpd.py b/BaseTools/Source/Python/BPDG/GenVpd.py index 366fac095b..bd2c05d782 100644 --- a/BaseTools/Source/Python/BPDG/GenVpd.py +++ b/BaseTools/Source/Python/BPDG/GenVpd.py @@ -305,7 +305,7 @@ class GenVPD : self.PcdFixedOffsetSizeList = []
self.PcdUnknownOffsetList = []
try:
- fInputfile = open(InputFileName, "r", 0)
+ fInputfile = open(InputFileName, "r")
try:
self.FileLinesList = fInputfile.readlines()
except:
@@ -650,7 +650,7 @@ class GenVPD : EdkLogger.error("BPDG", BuildToolError.FILE_OPEN_FAILURE, "File open failed for %s" % self.VpdFileName, None)
try :
- fMapFile = open(MapFileName, "w", 0)
+ fMapFile = open(MapFileName, "w")
except:
# Open failed
EdkLogger.error("BPDG", BuildToolError.FILE_OPEN_FAILURE, "File open failed for %s" % self.MapFileName, None)
|