mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-12-13 23:02:34 +00:00
Detect errors in video data writes
This commit is contained in:
parent
2bebb386b8
commit
131efd1ae0
1 changed files with 4 additions and 1 deletions
|
@ -566,7 +566,10 @@ class FileDownloader(object):
|
|||
except (OSError, IOError), err:
|
||||
self.trouble('ERROR: unable to open for writing: %s' % str(err))
|
||||
return False
|
||||
stream.write(data_block)
|
||||
try:
|
||||
stream.write(data_block)
|
||||
except (IOError, OSError), err:
|
||||
self.trouble('ERROR: unable to write data: %s' % str(err))
|
||||
block_size = self.best_block_size(after - before, data_block_len)
|
||||
|
||||
# Progress message
|
||||
|
|
Loading…
Reference in a new issue