IndexOfLine = 0\r
for Line in op:\r
IndexOfLine += 1\r
- if not Line.endswith('\r\n'):\r
+ if not bytes.decode(Line).endswith('\r\n'):\r
OtherMsg = "File %s has invalid line ending at line %s" % (Record[1], IndexOfLine)\r
EccGlobalData.gDb.TblReport.Insert(ERROR_GENERAL_CHECK_INVALID_LINE_ENDING, OtherMsg=OtherMsg, BelongsToTable='File', BelongsToItem=Record[0])\r
\r
RecordSet = EccGlobalData.gDb.TblFile.Exec(SqlCommand)\r
for Record in RecordSet:\r
if Record[2].upper() not in EccGlobalData.gConfig.BinaryExtList:\r
- op = open(Record[1], 'rb').readlines()\r
+ op = open(Record[1], 'r').readlines()\r
IndexOfLine = 0\r
for Line in op:\r
IndexOfLine += 1\r