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:
@ -18,7 +18,7 @@
|
||||
import Ffs
|
||||
import Rule
|
||||
import Common.LongFilePathOs as os
|
||||
import StringIO
|
||||
from io import BytesIO
|
||||
import subprocess
|
||||
|
||||
from GenFdsGlobalVariable import GenFdsGlobalVariable
|
||||
@ -82,7 +82,7 @@ class FileStatement (FileStatementClassObject) :
|
||||
Dict.update(self.DefineVarDict)
|
||||
SectionAlignments = None
|
||||
if self.FvName is not None :
|
||||
Buffer = StringIO.StringIO('')
|
||||
Buffer = BytesIO('')
|
||||
if self.FvName.upper() not in GenFdsGlobalVariable.FdfParser.Profile.FvDict:
|
||||
EdkLogger.error("GenFds", GENFDS_ERROR, "FV (%s) is NOT described in FDF file!" % (self.FvName))
|
||||
Fv = GenFdsGlobalVariable.FdfParser.Profile.FvDict.get(self.FvName.upper())
|
||||
|
Reference in New Issue
Block a user