diff options
author | Jesús <heckyel@hyperbola.info> | 2022-03-04 11:45:58 +0800 |
---|---|---|
committer | Jesús <heckyel@hyperbola.info> | 2022-03-04 11:45:58 +0800 |
commit | 2064247b6faafff3ee304ea6ec58495b8d9ee023 (patch) | |
tree | 8a9e77f31deb3f859fe21ca5d93cf362d29af8f5 /yt_dlp/downloader/fragment.py | |
parent | 4a094056595a2d714b238eb63ef0a5df6eb03397 (diff) | |
parent | 45806d44a7bc96dc0199410fec81cdce6015a546 (diff) | |
download | hypervideo-pre-2064247b6faafff3ee304ea6ec58495b8d9ee023.tar.lz hypervideo-pre-2064247b6faafff3ee304ea6ec58495b8d9ee023.tar.xz hypervideo-pre-2064247b6faafff3ee304ea6ec58495b8d9ee023.zip |
updated from upstream | 04/03/2022 at 11:45
Diffstat (limited to 'yt_dlp/downloader/fragment.py')
-rw-r--r-- | yt_dlp/downloader/fragment.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/yt_dlp/downloader/fragment.py b/yt_dlp/downloader/fragment.py index 83a9f81b6..95fb2f9e7 100644 --- a/yt_dlp/downloader/fragment.py +++ b/yt_dlp/downloader/fragment.py @@ -159,7 +159,7 @@ class FragmentFD(FileDownloader): if self.__do_ytdl_file(ctx): self._write_ytdl_file(ctx) if not self.params.get('keep_fragments', False): - os.remove(encodeFilename(ctx['fragment_filename_sanitized'])) + self.try_remove(encodeFilename(ctx['fragment_filename_sanitized'])) del ctx['fragment_filename_sanitized'] def _prepare_frag_download(self, ctx): @@ -305,7 +305,7 @@ class FragmentFD(FileDownloader): if self.__do_ytdl_file(ctx): ytdl_filename = encodeFilename(self.ytdl_filename(ctx['filename'])) if os.path.isfile(ytdl_filename): - os.remove(ytdl_filename) + self.try_remove(ytdl_filename) elapsed = time.time() - ctx['started'] if ctx['tmpfilename'] == '-': |