1
0
Fork 0
mirror of https://github.com/ytdl-org/youtube-dl.git synced 2024-12-22 16:57:40 +00:00

Abort download in case of error writing file data to disk

This commit is contained in:
Ricardo Garcia 2010-08-12 18:41:29 +02:00
parent 38ed13444a
commit d67e097462

View file

@ -594,7 +594,8 @@ class FileDownloader(object):
try:
stream.write(data_block)
except (IOError, OSError), err:
self.trouble('\nERROR: unable to write data: %s' % str(err))
self.trouble(u'\nERROR: unable to write data: %s' % str(err))
return False
block_size = self.best_block_size(after - before, data_block_len)
# Progress message