aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/livestreamer/utils.py
diff options
context:
space:
mode:
authorGravatar Christopher Rosell <chrippa@tanuki.se>2012-03-21 16:24:45 +0100
committerGravatar Christopher Rosell <chrippa@tanuki.se>2012-03-21 16:24:45 +0100
commit0f3765749001279fe232914bfa852650c4fd1162 (patch)
tree4236330f90d37783ddb76418a106b70d3912d6c1 /src/livestreamer/utils.py
parentf175241692dfc461d773589653fd55c47508a293 (diff)
Refactor the stream/command line handling.
Diffstat (limited to 'src/livestreamer/utils.py')
-rw-r--r--src/livestreamer/utils.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/livestreamer/utils.py b/src/livestreamer/utils.py
index 2b4214d..60a4d6a 100644
--- a/src/livestreamer/utils.py
+++ b/src/livestreamer/utils.py
@@ -9,9 +9,7 @@ class CommandLine(object):
def __init__(self, command):
self.command = command
self.args = {}
-
- def arg(self, key, value):
- self.args[key] = value
+ self.pipe = None
def format(self):
args = []
@@ -26,6 +24,9 @@ class CommandLine(object):
args = (" ").join(args)
cmdline = ("{0} {1}").format(self.command, args)
+ if self.pipe:
+ cmdline += (" | {0}").format(self.pipe)
+
return cmdline
class ArgumentParser(argparse.ArgumentParser):