aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/downloader/rtmp.py
diff options
context:
space:
mode:
authorPhilipp Hagemeister <phihag@phihag.de>2014-08-28 01:01:04 +0200
committerPhilipp Hagemeister <phihag@phihag.de>2014-08-28 01:01:04 +0200
commit27f774862d583efcfbeb6f97bee53b333a0b95a9 (patch)
tree33e89a076265dd367763847792b30adeab3ff47e /youtube_dl/downloader/rtmp.py
parentb759a0d4d2273fdde1f504cdc928ea340e12456e (diff)
parent7798fad535750acb2e96f1055062fa98d0694a55 (diff)
Merge remote-tracking branch 'origin/master'
Diffstat (limited to 'youtube_dl/downloader/rtmp.py')
-rw-r--r--youtube_dl/downloader/rtmp.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/youtube_dl/downloader/rtmp.py b/youtube_dl/downloader/rtmp.py
index 68646709a..5eb108302 100644
--- a/youtube_dl/downloader/rtmp.py
+++ b/youtube_dl/downloader/rtmp.py
@@ -8,9 +8,10 @@ import time
from .common import FileDownloader
from ..utils import (
+ check_executable,
+ compat_str,
encodeFilename,
format_bytes,
- compat_str,
)
@@ -103,9 +104,7 @@ class RtmpFD(FileDownloader):
test = self.params.get('test', False)
# Check for rtmpdump first
- try:
- subprocess.call(['rtmpdump', '-h'], stdout=(open(os.path.devnull, 'w')), stderr=subprocess.STDOUT)
- except (OSError, IOError):
+ if not check_executable('rtmpdump', ['-h']):
self.report_error('RTMP download detected but "rtmpdump" could not be run. Please install it.')
return False