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 re
|
||||
import Common.EdkLogger as EdkLogger
|
||||
from Common.BuildToolError import *
|
||||
from UniClassObject import *
|
||||
from StringIO import StringIO
|
||||
from io import BytesIO
|
||||
from struct import pack, unpack
|
||||
from Common.LongFilePathSupport import OpenLongFilePath as open
|
||||
|
||||
@ -341,7 +341,7 @@ def CreateCFileContent(BaseName, UniObjectClass, IsCompatibleMode, UniBinBuffer,
|
||||
if Language not in UniLanguageListFiltered:
|
||||
continue
|
||||
|
||||
StringBuffer = StringIO()
|
||||
StringBuffer = BytesIO()
|
||||
StrStringValue = ''
|
||||
ArrayLength = 0
|
||||
NumberOfUseOtherLangDef = 0
|
||||
|
Reference in New Issue
Block a user