diff options
author | Ricardo Garcia <[email protected]> | 2010-04-17 18:49:56 +0200 |
---|---|---|
committer | Ricardo Garcia <[email protected]> | 2010-10-31 11:27:01 +0100 |
commit | 131efd1ae0899f261fe9faccb91f5c9c3aa974c5 (patch) | |
tree | 2cce8c5cbcb6ac44507b96a8bfac82f4bac6829b | |
parent | 2bebb386b86963ed644a6f4196d97b82902e218f (diff) | |
download | youtube-dl-131efd1ae0899f261fe9faccb91f5c9c3aa974c5.tar.gz youtube-dl-131efd1ae0899f261fe9faccb91f5c9c3aa974c5.zip |
Detect errors in video data writes
-rwxr-xr-x | youtube-dl | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/youtube-dl b/youtube-dl index d2bd0bf5f..86e247994 100755 --- a/youtube-dl +++ b/youtube-dl @@ -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 |