diff options
author | Yunhua Feng <yunhuax.feng@intel.com> | 2018-10-11 11:20:59 +0800 |
---|---|---|
committer | Yonghong Zhu <yonghong.zhu@intel.com> | 2018-10-13 09:54:07 +0800 |
commit | 86e6cf98a8493574878286522078050ac4dd505d (patch) | |
tree | ca47729eab67c9f90e0dac5a14dc5ca14ef22ef1 /BaseTools/Source/Python/GenFds/FvImageSection.py | |
parent | a09f4c91f785e36f0987aa3a6d7656ba51e6aeda (diff) | |
download | edk2-86e6cf98a8493574878286522078050ac4dd505d.tar.gz edk2-86e6cf98a8493574878286522078050ac4dd505d.tar.bz2 edk2-86e6cf98a8493574878286522078050ac4dd505d.zip |
BaseTools: Handle the bytes and str difference
Deal with bytes and str is different, remove the unicode()
Using utcfromtimestamp instead of fromtimestamp.
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/GenFds/FvImageSection.py')
-rw-r--r-- | BaseTools/Source/Python/GenFds/FvImageSection.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/BaseTools/Source/Python/GenFds/FvImageSection.py b/BaseTools/Source/Python/GenFds/FvImageSection.py index 3278a8befa..5f1b42b078 100644 --- a/BaseTools/Source/Python/GenFds/FvImageSection.py +++ b/BaseTools/Source/Python/GenFds/FvImageSection.py @@ -98,7 +98,7 @@ class FvImageSection(FvImageSectionClassObject): # Generate Fv
#
if self.FvName is not None:
- Buffer = BytesIO('')
+ Buffer = BytesIO()
Fv = GenFdsGlobalVariable.FdfParser.Profile.FvDict.get(self.FvName)
if Fv is not None:
self.Fv = Fv
@@ -118,7 +118,7 @@ class FvImageSection(FvImageSectionClassObject): # PI FvHeader is 0x48 byte
FvHeaderBuffer = FvFileObj.read(0x48)
# FV alignment position.
- FvAlignmentValue = 1 << (ord (FvHeaderBuffer[0x2E]) & 0x1F)
+ FvAlignmentValue = 1 << (FvHeaderBuffer[0x2E] & 0x1F)
# FvAlignmentValue is larger than or equal to 1K
if FvAlignmentValue >= 0x400:
if FvAlignmentValue >= 0x100000:
|