Close video file before removing it.
authorRicardo Garcia <sarbalap+freshmeat@gmail.com>
Thu, 21 May 2009 18:58:31 +0000 (20:58 +0200)
committerRicardo Garcia <sarbalap+freshmeat@gmail.com>
Sun, 31 Oct 2010 10:24:19 +0000 (11:24 +0100)
youtube-dl

index b2dc7952d9c3a0a1c7ed41bde7be98d3e887f3a2..ec4c9b89c6e18abc2d0548ed38d3ffefc3a3631f 100755 (executable)
@@ -286,6 +286,7 @@ class FileDownloader(object):
                        self._do_download(outstream, info_dict['url'])
                        outstream.close()
                except (OSError, IOError), err:
+                       outstream.close()
                        os.remove(filename)
                        raise UnavailableFormatError
                except (urllib2.URLError, httplib.HTTPException, socket.error), err: