diff options
author | Ricardo Garcia <sarbalap+freshmeat@gmail.com> | 2010-08-12 18:41:29 +0200 |
---|---|---|
committer | Ricardo Garcia <sarbalap+freshmeat@gmail.com> | 2010-10-31 11:28:41 +0100 |
commit | d67e097462e238f47bc9203e5bba0e5120e7f5f9 (patch) | |
tree | d67fd231da383f8e90ed1ee64d19a66228a2ccf3 | |
parent | 38ed13444a0576ea98ae5b15aa6422bb4d5737ec (diff) |
Abort download in case of error writing file data to disk
-rwxr-xr-x | youtube-dl | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/youtube-dl b/youtube-dl index 727fadea4..fb231ae40 100755 --- a/youtube-dl +++ b/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 |