Browse Source

Abort download in case of error writing file data to disk

master
Ricardo Garcia 14 years ago
parent
commit
d67e097462
1 changed files with 2 additions and 1 deletions
  1. 3
      youtube-dl

3
youtube-dl

@ -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

Loading…
Cancel
Save