mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-12-27 01:01:17 +00:00
[http] Avoid closing stdout (Fixes #3686)
This commit is contained in:
parent
140d8d77b3
commit
88a23aef5a
1 changed files with 2 additions and 1 deletions
|
@ -193,7 +193,8 @@ def real_download(self, filename, info_dict):
|
||||||
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
|
||||||
stream.close()
|
if tmpfilename != u'-':
|
||||||
|
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:
|
||||||
raise ContentTooShortError(byte_counter, int(data_len))
|
raise ContentTooShortError(byte_counter, int(data_len))
|
||||||
|
|
Loading…
Reference in a new issue