diff options
author | Gary Lin <glin@suse.com> | 2018-06-25 13:31:36 +0300 |
---|---|---|
committer | Yonghong Zhu <yonghong.zhu@intel.com> | 2018-06-27 11:33:28 +0300 |
commit | 86379ac48ba17c71d4623c57099b064b15118e21 (patch) | |
tree | 9ec107c195a28a4bdcf9b4734fa2c20b8c07ce32 /BaseTools/Source/Python/GenFds/FfsFileStatement.py | |
parent | 0d1f5b2b5dc3c1cf381be0a1ec8f960dc6029a93 (diff) | |
download | edk2-86379ac48ba17c71d4623c57099b064b15118e21.tar.xz |
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>
Diffstat (limited to 'BaseTools/Source/Python/GenFds/FfsFileStatement.py')
-rw-r--r-- | BaseTools/Source/Python/GenFds/FfsFileStatement.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/BaseTools/Source/Python/GenFds/FfsFileStatement.py b/BaseTools/Source/Python/GenFds/FfsFileStatement.py index ba8e0465ef..f5de57d0ac 100644 --- a/BaseTools/Source/Python/GenFds/FfsFileStatement.py +++ b/BaseTools/Source/Python/GenFds/FfsFileStatement.py @@ -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())
|