A feature-rich command-line audio/video downloader
[downloader/hls] Use check_executable
Jaime Marquínez Ferrándiz3c765c68c48c
diff --git a/youtube_dl/downloader/hls.py b/youtube_dl/downloader/hls.pyindex 4082e481a8..40d854aa3a 100644--- a/youtube_dl/downloader/hls.py+++ b/youtube_dl/downloader/hls.py@@ -3,6 +3,7 @@ import subprocessfrom .common import FileDownloaderfrom ..utils import (+ check_executable,encodeFilename,)@@ -19,11 +20,8 @@ class HlsFD(FileDownloader):encodeFilename(tmpfilename, for_subprocess=True)]for program in ['avconv', 'ffmpeg']:- try:- subprocess.call([program, '-version'], stdout=(open(os.path.devnull, 'w')), stderr=subprocess.STDOUT)+ if check_executable(program, ['-version']):break- except (OSError, IOError):- passelse:self.report_error(u'm3u8 download detected but ffmpeg or avconv could not be found. Please install one.')cmd = [program] + args