From ac0d0d22ebac4ff5aad69fb89a1414d316aeed8a Mon Sep 17 00:00:00 2001 From: Christopher Rosell Date: Mon, 18 Jun 2012 02:34:32 +0200 Subject: 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. --- src/livestreamer/cli.py | 8 ++++---- 1 file 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") -- cgit v1.2.3