From: Jaime Marquínez Ferrándiz Date: Wed, 27 Aug 2014 13:56:27 +0000 (+0200) Subject: [downloader/rtmp] Use check_exectuble X-Git-Url: http://git.oshgnacknak.de/?a=commitdiff_plain;h=7798fad535750acb2e96f1055062fa98d0694a55;p=youtube-dl [downloader/rtmp] Use check_exectuble --- 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