diff options
author | Christopher Rosell <chrippa@tanuki.se> | 2012-06-18 02:34:32 +0200 |
---|---|---|
committer | Christopher Rosell <chrippa@tanuki.se> | 2012-06-18 02:34:32 +0200 |
commit | ac0d0d22ebac4ff5aad69fb89a1414d316aeed8a (patch) | |
tree | 87fff0b4ef5fe99ab6018e72b6062734e755a10e /src | |
parent | ad31b868cc22aa4b9c38f62c80264e074b3c074d (diff) |
Use Popen instead of pbs when launching player.
This increases compability with Windows since it
will use cmd.exe instead of trying to use /bin/sh.
Diffstat (limited to 'src')
-rw-r--r-- | src/livestreamer/cli.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/livestreamer/cli.py b/src/livestreamer/cli.py index e3f557a..429c43d 100644 --- a/src/livestreamer/cli.py +++ b/src/livestreamer/cli.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 -import sys, os, pbs, argparse +import sys, os, argparse, subprocess import livestreamer from livestreamer.compat import input, stdout @@ -123,9 +123,9 @@ def output_stream(stream, args): pout = sys.stderr perr = sys.stdout - player = pbs.sh("-c", cmd, _bg=True, _out=pout, _err=perr) - - out = player.process.stdin + player = subprocess.Popen(cmd, shell=True, stdout=pout, stderr=perr, + stdin=subprocess.PIPE) + out = player.stdin if not out: exit("Failed to open a valid stream output") |