1
0
mirror of https://codeberg.org/polarisfm/youtube-dl synced 2024-11-22 16:44:32 +01:00

Close video file before removing it.

This commit is contained in:
Ricardo Garcia 2009-05-21 20:58:31 +02:00
parent 097ba9472b
commit 488f619471

View File

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