diff options
Diffstat (limited to 'youtube-dl')
-rwxr-xr-x | youtube-dl | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/youtube-dl b/youtube-dl index 094a4164c..8494be96c 100755 --- a/youtube-dl +++ b/youtube-dl @@ -94,6 +94,9 @@ def sanitize_open(filename, open_mode): """ try: if filename == u'-': + if sys.platform == 'win32': + import msvcrt + msvcrt.setmode(sys.stdout.fileno(), os.O_BINARY) return (sys.stdout, filename) stream = open(filename, open_mode) return (stream, filename) |