From: Ricardo Garcia Date: Fri, 19 Mar 2010 16:51:20 +0000 (+0100) Subject: Make the "-" output file name equivalent to /dev/stdout (fixes issue #103) X-Git-Url: http://git.oshgnacknak.de/?a=commitdiff_plain;h=131bc7651a546d09028cdbb231339b624bf1fbbf;p=youtube-dl Make the "-" output file name equivalent to /dev/stdout (fixes issue #103) --- diff --git a/youtube-dl b/youtube-dl index 742fabb49..b79ab0294 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: