1
0
Fork 0
mirror of https://github.com/ytdl-org/youtube-dl.git synced 2024-11-26 04:02:11 +00:00

[http] Avoid closing stdout (Fixes #3686)

This commit is contained in:
Sergey M․ 2014-09-05 22:05:36 +07:00
parent 140d8d77b3
commit 88a23aef5a

View file

@ -193,6 +193,7 @@ class HttpFD(FileDownloader):
self.to_stderr(u"\n") self.to_stderr(u"\n")
self.report_error(u'Did not get any data blocks') self.report_error(u'Did not get any data blocks')
return False return False
if tmpfilename != u'-':
stream.close() stream.close()
self.report_finish(data_len_str, (time.time() - start)) self.report_finish(data_len_str, (time.time() - start))
if data_len is not None and byte_counter != data_len: if data_len is not None and byte_counter != data_len: