BaseTools: Replace StringIO.StringIO with io.BytesIO
Replace StringIO.StringIO with io.BytesIO to be compatible with python3. This commit also removes "import StringIO" from those python scripts that don't really use it. Contributed-under: TianoCore Contribution Agreement 1.1 Cc: Yonghong Zhu <yonghong.zhu@intel.com> Cc: Liming Gao <liming.gao@intel.com> Signed-off-by: Gary Lin <glin@suse.com> Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
This commit is contained in:
@ -16,7 +16,7 @@
|
||||
# Import Modules
|
||||
#
|
||||
import Section
|
||||
import StringIO
|
||||
from io import BytesIO
|
||||
from Ffs import Ffs
|
||||
import subprocess
|
||||
from GenFdsGlobalVariable import GenFdsGlobalVariable
|
||||
@ -98,7 +98,7 @@ class FvImageSection(FvImageSectionClassObject):
|
||||
# Generate Fv
|
||||
#
|
||||
if self.FvName is not None:
|
||||
Buffer = StringIO.StringIO('')
|
||||
Buffer = BytesIO('')
|
||||
Fv = GenFdsGlobalVariable.FdfParser.Profile.FvDict.get(self.FvName)
|
||||
if Fv is not None:
|
||||
self.Fv = Fv
|
||||
|
Reference in New Issue
Block a user