BaseTools: Handle the bytes and str difference
Deal with bytes and str is different, remove the unicode(), correct open file parameter. Using utcfromtimestamp instead of fromtimestamp. Cc: Bob Feng <bob.c.feng@intel.com> Cc: Liming Gao <liming.gao@intel.com> Cc: Yonghong Zhu <yonghong.zhu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Zhiju.Fan <zhijux.fan@intel.com> Tested-by: Laszlo Ersek <lersek@redhat.com> Tested-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Bob Feng <bob.c.feng@intel.com>
This commit is contained in:
@ -72,7 +72,7 @@ class FD(FDClassObject):
|
||||
HasCapsuleRegion = True
|
||||
break
|
||||
if HasCapsuleRegion:
|
||||
TempFdBuffer = BytesIO('')
|
||||
TempFdBuffer = BytesIO()
|
||||
PreviousRegionStart = -1
|
||||
PreviousRegionSize = 1
|
||||
|
||||
@ -101,7 +101,7 @@ class FD(FDClassObject):
|
||||
GenFdsGlobalVariable.VerboseLogger('Call each region\'s AddToBuffer function')
|
||||
RegionObj.AddToBuffer (TempFdBuffer, self.BaseAddress, self.BlockSizeList, self.ErasePolarity, GenFdsGlobalVariable.ImageBinDict, self.DefineVarDict)
|
||||
|
||||
FdBuffer = BytesIO('')
|
||||
FdBuffer = BytesIO()
|
||||
PreviousRegionStart = -1
|
||||
PreviousRegionSize = 1
|
||||
for RegionObj in self.RegionList :
|
||||
|
Reference in New Issue
Block a user