From 131bc7651a546d09028cdbb231339b624bf1fbbf Mon Sep 17 00:00:00 2001 From: Ricardo Garcia Date: Fri, 19 Mar 2010 17:51:20 +0100 Subject: [PATCH] Make the "-" output file name equivalent to /dev/stdout (fixes issue #103) --- youtube-dl | 2 ++ 1 file changed, 2 insertions(+) diff --git a/youtube-dl b/youtube-dl index 742fabb492..b79ab02943 100755 --- a/youtube-dl +++ b/youtube-dl @@ -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: