diff options
author | Christopher Rosell <chrippa@tanuki.se> | 2012-06-13 16:22:55 +0200 |
---|---|---|
committer | Christopher Rosell <chrippa@tanuki.se> | 2012-06-13 16:22:55 +0200 |
commit | b66cb24f88c9b7ac2bdcd178d0dcfcf53fce9c3f (patch) | |
tree | a76a4a79f953d09311664f9ff282536a152a6b78 | |
parent | 0b0be39ebf40379a6cc9262a2b8c54223cdba062 (diff) |
Check for errors when testing --jtv compatibility.
-rw-r--r-- | src/livestreamer/stream.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/livestreamer/stream.py b/src/livestreamer/stream.py index 9f5aafc..54ab060 100644 --- a/src/livestreamer/stream.py +++ b/src/livestreamer/stream.py @@ -1,5 +1,6 @@ from livestreamer import options from livestreamer.utils import urlopen +from livestreamer.compat import str import os import pbs @@ -65,7 +66,10 @@ class RTMPStream(StreamProcess): return StreamProcess.open(self) def _has_jtv_support(self): - help = self.cmd(help=True, _err_to_out=True) + try: + help = self.cmd(help=True, _err_to_out=True) + except pbs.ErrorReturnCode as err: + raise StreamError(("Error while checking rtmpdump compatibility: {0}").format(str(err.stdout, "ascii"))) for line in help.split("\n"): if line[:5] == "--jtv": |