mirror of
https://github.com/Lekensteyn/lglaf.git
synced 2024-11-30 10:56:49 -05:00
fix unwanted CRLF conversion on windows
This commit is contained in:
parent
034e751d0b
commit
5d7efa2951
1 changed files with 3 additions and 0 deletions
3
lglaf.py
3
lglaf.py
|
@ -373,6 +373,9 @@ def main():
|
|||
level=logging.DEBUG if args.debug else logging.INFO)
|
||||
|
||||
# Binary stdout (output data from device as-is)
|
||||
if sys.platform == "win32":
|
||||
import os, msvcrt
|
||||
msvcrt.setmode(sys.stdout.fileno(), os.O_BINARY)
|
||||
try: stdout_bin = sys.stdout.buffer
|
||||
except: stdout_bin = sys.stdout
|
||||
|
||||
|
|
Loading…
Reference in a new issue