diff options
author | Christopher Rosell <chrippa@tanuki.se> | 2012-06-14 00:13:46 +0200 |
---|---|---|
committer | Christopher Rosell <chrippa@tanuki.se> | 2012-06-14 00:13:46 +0200 |
commit | c125a8406d7a37f3f56f2c291ba22c2aaa0d0ac3 (patch) | |
tree | e7d8b5e324bec3a83790afd93fab89e528b73858 | |
parent | b66cb24f88c9b7ac2bdcd178d0dcfcf53fce9c3f (diff) |
Use getattr instead of internal pbs function.
-rw-r--r-- | src/livestreamer/stream.py | 7 |
1 files 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))) |