diff options
author | Pete Hemery <petehemery@hotmail.com> | 2015-04-07 22:33:18 +0100 |
---|---|---|
committer | Pete Hemery <petehemery@hotmail.com> | 2015-04-07 22:33:18 +0100 |
commit | cc55d08832f5008efb56228900a0dbacb428ed7f (patch) | |
tree | 8554b48ed1e7ef1a6e71ebc26e3a20db18acb7cc | |
parent | a35099bd331e42d96e647865f4a644b217bba62a (diff) |
[ffmpeg] adding exception catching for call to os.utime in run_ffmpeg_multiple_files
-rw-r--r-- | youtube_dl/postprocessor/ffmpeg.py | 6 |
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) |