mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-12-01 02:37:29 +01:00
Merge pull request #762 from jynnantonix/master
Use sys.stdout.buffer when writing to standard out
This commit is contained in:
commit
59b4a2f0e4
@ -329,7 +329,7 @@ def sanitize_open(filename, open_mode):
|
||||
if sys.platform == 'win32':
|
||||
import msvcrt
|
||||
msvcrt.setmode(sys.stdout.fileno(), os.O_BINARY)
|
||||
return (sys.stdout, filename)
|
||||
return (sys.stdout.buffer, filename)
|
||||
stream = open(encodeFilename(filename), open_mode)
|
||||
return (stream, filename)
|
||||
except (IOError, OSError) as err:
|
||||
|
Loading…
Reference in New Issue
Block a user