Browse Source

Make the "-" output file name equivalent to /dev/stdout (fixes issue #103)

rtmp_test
Ricardo Garcia 15 years ago
parent
commit
131bc7651a
1 changed files with 2 additions and 0 deletions
  1. +2
    -0
      youtube-dl

+ 2
- 0
youtube-dl View File

@ -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…
Cancel
Save