From c125a8406d7a37f3f56f2c291ba22c2aaa0d0ac3 Mon Sep 17 00:00:00 2001 From: Christopher Rosell Date: Thu, 14 Jun 2012 00:13:46 +0200 Subject: Use getattr instead of internal pbs function. --- src/livestreamer/stream.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/livestreamer/stream.py b/src/livestreamer/stream.py index 54ab060..486e620 100644 --- a/src/livestreamer/stream.py +++ b/src/livestreamer/stream.py @@ -48,14 +48,11 @@ class RTMPStream(StreamProcess): def __init__(self, params): StreamProcess.__init__(self, params) - self.rtmpdump = options.get("rtmpdump") + self.rtmpdump = options.get("rtmpdump") or "rtmpdump" self.params["flv"] = "-" try: - if self.rtmpdump: - self.cmd = pbs.Command._create(self.rtmpdump) - else: - self.cmd = pbs.rtmpdump + self.cmd = getattr(pbs, self.rtmpdump) except pbs.CommandNotFound as err: raise StreamError(("Unable to find {0} command").format(str(err))) -- cgit v1.2.3