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:
@ -223,7 +223,7 @@ class Check(object):
|
||||
IndexOfLine = 0
|
||||
for Line in op:
|
||||
IndexOfLine += 1
|
||||
if not bytes.decode(Line).endswith('\r\n'):
|
||||
if not Line.endswith('\r\n'):
|
||||
OtherMsg = "File %s has invalid line ending at line %s" % (Record[1], IndexOfLine)
|
||||
EccGlobalData.gDb.TblReport.Insert(ERROR_GENERAL_CHECK_INVALID_LINE_ENDING, OtherMsg=OtherMsg, BelongsToTable='File', BelongsToItem=Record[0])
|
||||
|
||||
@ -235,7 +235,7 @@ class Check(object):
|
||||
RecordSet = EccGlobalData.gDb.TblFile.Exec(SqlCommand)
|
||||
for Record in RecordSet:
|
||||
if Record[2].upper() not in EccGlobalData.gConfig.BinaryExtList:
|
||||
op = open(Record[1], 'r').readlines()
|
||||
op = open(Record[1], 'rb').readlines()
|
||||
IndexOfLine = 0
|
||||
for Line in op:
|
||||
IndexOfLine += 1
|
||||
|
Reference in New Issue
Block a user