mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-12-20 05:40:00 +00:00
Close video file before removing it.
This commit is contained in:
parent
097ba9472b
commit
488f619471
1 changed files with 1 additions and 0 deletions
|
@ -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:
|
||||
|
|
Loading…
Reference in a new issue