Revert BaseTools: PYTHON3 migration
This reverts commit 6693f359b3c213513c5096a06c6f67244a44dc52..
678f851312
.
Python3 migration is the fundamental change. It requires every developer
to install Python3. Before this migration, the well communication and wide
verification must be done. But now, most people is not aware of this change,
and not try it. So, Python3 migration is reverted and be moved to edk2-staging
Python3 branch for the edk2 user evaluation.
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Liming Gao <liming.gao@intel.com>
This commit is contained in:
@ -15,13 +15,13 @@
|
||||
##
|
||||
# Import Modules
|
||||
#
|
||||
from __future__ import absolute_import
|
||||
from .GenFdsGlobalVariable import GenFdsGlobalVariable
|
||||
from .GenFdsGlobalVariable import FindExtendTool
|
||||
from CommonDataClass.FdfClass import CapsuleClassObject
|
||||
import Common.LongFilePathOs as os
|
||||
import subprocess
|
||||
from io import BytesIO
|
||||
from io import StringIO
|
||||
from Common.Misc import SaveFileOnChange
|
||||
from Common.Misc import PackRegistryFormatGuid
|
||||
import uuid
|
||||
@ -185,7 +185,7 @@ class Capsule (CapsuleClassObject) :
|
||||
#
|
||||
# The real capsule header structure is 28 bytes
|
||||
#
|
||||
Header.write(b'\x00'*(HdrSize-28))
|
||||
Header.write('\x00'*(HdrSize-28))
|
||||
Header.write(FwMgrHdr.getvalue())
|
||||
Header.write(Content.getvalue())
|
||||
#
|
||||
@ -247,7 +247,7 @@ class Capsule (CapsuleClassObject) :
|
||||
def GenCapInf(self):
|
||||
self.CapInfFileName = os.path.join(GenFdsGlobalVariable.FvDir,
|
||||
self.UiCapsuleName + "_Cap" + '.inf')
|
||||
CapInfFile = StringIO() #open (self.CapInfFileName , 'w+')
|
||||
CapInfFile = BytesIO() #open (self.CapInfFileName , 'w+')
|
||||
|
||||
CapInfFile.writelines("[options]" + T_CHAR_LF)
|
||||
|
||||
|
Reference in New Issue
Block a user