mirror of
https://pagure.io/fm-orchestrator.git
synced 2026-04-07 20:58:27 +08:00
When encoutering a Windows end of line (^M), io.open and open in Python 3 will convert those to UNIX end of lines by default. When reading logs to compute the checksum, it's important those new lines aren't converted, to ensure the checksum is correct. This caused issues in Fedora staging because when cloning down a repo, the repoSpanner output had Windows end of lines, and this would end up in build.log. The solution is to just read it as binary so that Python doesn't perform these conversions.