about summary refs log tree commit diff
diff options
context:
space:
mode:
authorSergey M. <dstftw@gmail.com>2015-04-08 20:27:17 +0500
committerSergey M. <dstftw@gmail.com>2015-04-08 20:27:17 +0500
commitbca788ab1d477abfc29edb29480075ed10cace25 (patch)
tree1bc1f2c7e9d2460937682f0caa1840069290366c
parentaef8fdba1172d60983ba9685249c03b66e7a94f0 (diff)
parentcc55d08832f5008efb56228900a0dbacb428ed7f (diff)
downloadyoutube-dl-bca788ab1d477abfc29edb29480075ed10cace25.tar.gz
youtube-dl-bca788ab1d477abfc29edb29480075ed10cace25.tar.xz
youtube-dl-bca788ab1d477abfc29edb29480075ed10cace25.zip
Merge pull request #5376 from PeteHemery/ffmpeg-postproc-utime-bug
[ffmpeg] adding exception catching for call to os.utime in run_ffmpeg_multiple_files
-rw-r--r--youtube_dl/postprocessor/ffmpeg.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/youtube_dl/postprocessor/ffmpeg.py b/youtube_dl/postprocessor/ffmpeg.py
index 0b60ac7e7..5ef5e0e54 100644
--- a/youtube_dl/postprocessor/ffmpeg.py
+++ b/youtube_dl/postprocessor/ffmpeg.py
@@ -146,7 +146,11 @@ class FFmpegPostProcessor(PostProcessor):
             stderr = stderr.decode('utf-8', 'replace')
             msg = stderr.strip().split('\n')[-1]
             raise FFmpegPostProcessorError(msg)
-        os.utime(encodeFilename(out_path), (oldest_mtime, oldest_mtime))
+        try:
+            os.utime(encodeFilename(out_path), (oldest_mtime, oldest_mtime))
+        except Exception:
+            self._downloader.report_warning('Cannot update utime of file')
+
         if self._deletetempfiles:
             for ipath in input_paths:
                 os.remove(ipath)