Need to use binary stdin and stdout on Windows
Bug #579296 reported by
Martin Packman
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
subunit |
Fix Released
|
Critical
|
Robert Collins |
Bug Description
Before bug 505078 is fixed and subunit starts using a format resilient against newline mangling, subunit scripts need to change the mode of stdin and stdout to binary.
The short and hacky way to do this is something like:
import os, sys
...
if __name__ == "__main__":
if sys.platform == "win32":
import msvcrt
for f in (sys.stdin, sys.stdout):
main()
Related branches
Changed in subunit: | |
status: | New → In Progress |
importance: | Undecided → Critical |
assignee: | nobody → Robert Collins (lifeless) |
milestone: | none → next |
Changed in subunit: | |
status: | In Progress → Fix Released |
To post a comment you must log in.
thanks, thats great. We'll need to apply this to all the filters.
*might* want to optimistically try to do it on streams we're given.
What do you think?