mirror of
https://github.com/ytdl-org/youtube-dl.git
synced 2024-12-22 16:57:40 +00:00
Make the "-" output file name equivalent to /dev/stdout (fixes issue #103)
This commit is contained in:
parent
5caacaddc6
commit
131bc7651a
1 changed files with 2 additions and 0 deletions
|
@ -93,6 +93,8 @@ def sanitize_open(filename, open_mode):
|
|||
It returns the tuple (stream, definitive_file_name).
|
||||
"""
|
||||
try:
|
||||
if filename == u'-':
|
||||
return (sys.stdout, filename)
|
||||
stream = open(filename, open_mode)
|
||||
return (stream, filename)
|
||||
except (IOError, OSError), err:
|
||||
|
|
Loading…
Reference in a new issue