mirror of
https://github.com/ytdl-org/youtube-dl.git
synced 2024-11-29 13:42:37 +00:00
[ffmpeg] adding exception catching for call to os.utime in run_ffmpeg_multiple_files
This commit is contained in:
parent
a35099bd33
commit
cc55d08832
1 changed files with 5 additions and 1 deletions
|
@ -146,7 +146,11 @@ class FFmpegPostProcessor(PostProcessor):
|
||||||
stderr = stderr.decode('utf-8', 'replace')
|
stderr = stderr.decode('utf-8', 'replace')
|
||||||
msg = stderr.strip().split('\n')[-1]
|
msg = stderr.strip().split('\n')[-1]
|
||||||
raise FFmpegPostProcessorError(msg)
|
raise FFmpegPostProcessorError(msg)
|
||||||
|
try:
|
||||||
os.utime(encodeFilename(out_path), (oldest_mtime, oldest_mtime))
|
os.utime(encodeFilename(out_path), (oldest_mtime, oldest_mtime))
|
||||||
|
except Exception:
|
||||||
|
self._downloader.report_warning('Cannot update utime of file')
|
||||||
|
|
||||||
if self._deletetempfiles:
|
if self._deletetempfiles:
|
||||||
for ipath in input_paths:
|
for ipath in input_paths:
|
||||||
os.remove(ipath)
|
os.remove(ipath)
|
||||||
|
|
Loading…
Reference in a new issue