(command, logFile)
| 510 | |
| 511 | def printFileContents(fileName): |
| 512 | |
| 513 | # Assume log file was written in system's default encoding, but |
| 514 | # even if we are wrong, we replace errors ... the ASCII chars |
| 515 | # (which is what we mostly care about eg for the test seed) should |
| 516 | # still survive: |
| 517 | txt = codecs.open(fileName, 'r', encoding=sys.getdefaultencoding(), errors='replace').read() |
| 518 | |
| 519 | # Encode to our output encoding (likely also system's default |
| 520 | # encoding): |
| 521 | bytes = txt.encode(sys.stdout.encoding, errors='replace') |
no test coverage detected