aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl
diff options
context:
space:
mode:
authorJaime Marquínez Ferrándiz <jaime.marquinez.ferrandiz@gmail.com>2014-08-27 15:49:07 +0200
committerJaime Marquínez Ferrándiz <jaime.marquinez.ferrandiz@gmail.com>2014-08-27 15:49:07 +0200
commit3c765c68c48ccee617ea777214327022e01f715a (patch)
treec8be403d8107a3a95c0c104bf0c79658df60cfe2 /youtube_dl
parent29153f49b341858bf3da3b34fb5cc5772bafc83e (diff)
[downloader/hls] Use check_executable
Diffstat (limited to 'youtube_dl')
-rw-r--r--youtube_dl/downloader/hls.py6
1 files changed, 2 insertions, 4 deletions
diff --git a/youtube_dl/downloader/hls.py b/youtube_dl/downloader/hls.py
index 4082e481a..40d854aa3 100644
--- a/youtube_dl/downloader/hls.py
+++ b/youtube_dl/downloader/hls.py
@@ -3,6 +3,7 @@ import subprocess
from .common import FileDownloader
from ..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):
- pass
else:
self.report_error(u'm3u8 download detected but ffmpeg or avconv could not be found. Please install one.')
cmd = [program] + args