mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-12-27 00:32:31 +00:00
[downloader/rtmp] Use check_exectuble
This commit is contained in:
parent
baf2907501
commit
7798fad535
1 changed files with 3 additions and 4 deletions
|
@ -8,9 +8,10 @@
|
|||
|
||||
from .common import FileDownloader
|
||||
from ..utils import (
|
||||
check_executable,
|
||||
compat_str,
|
||||
encodeFilename,
|
||||
format_bytes,
|
||||
compat_str,
|
||||
)
|
||||
|
||||
|
||||
|
@ -103,9 +104,7 @@ def run_rtmpdump(args):
|
|||
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
|
||||
|
||||
|
|
Loading…
Reference in a new issue