1
0
Fork 0
mirror of https://github.com/ytdl-org/youtube-dl.git synced 2024-11-29 13:42:37 +00:00

fixed a report error when in stdout mode

This commit is contained in:
Henry Cooke 2011-11-07 18:25:42 -05:00
parent a59c25bc63
commit 96cf6898fa

View file

@ -1005,7 +1005,7 @@ class FileDownloader(object):
return False return False
if self.params.get('writetostdout', False): if self.params.get('writetostdout', False):
stream.close() # if we're using stdout, it was already open stream.close() # if we're using stdout, it was already open
self.report_finish() self.report_finish()
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, long(data_len)) raise ContentTooShortError(byte_counter, long(data_len))
self.try_rename(tmpfilename, filename) self.try_rename(tmpfilename, filename)