diff options
| author | Felix Domke <tmbinc@elitedvb.net> | 2009-02-11 12:52:48 +0100 |
|---|---|---|
| committer | Felix Domke <tmbinc@elitedvb.net> | 2009-02-11 12:52:48 +0100 |
| commit | bbfcb7ea1f040d030277e2b6f2efa9ea0967bf2b (patch) | |
| tree | c5945c791698c14723e989449e6b4bfcc275c05d /lib/python/Components/Console.py | |
| parent | 4f7990ff2a55874b9eb65e3c9cd47dacb9f76deb (diff) | |
| parent | 5e6f814d005a01caa437a532e61f4b338617ff67 (diff) | |
| download | enigma2-bbfcb7ea1f040d030277e2b6f2efa9ea0967bf2b.tar.gz enigma2-bbfcb7ea1f040d030277e2b6f2efa9ea0967bf2b.zip | |
Merge branch 'master' of /home/tmbinc/enigma2-git into tmbinc/FixTimingBugs
Conflicts:
lib/dvb/decoder.cpp
Diffstat (limited to 'lib/python/Components/Console.py')
| -rw-r--r-- | lib/python/Components/Console.py | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/lib/python/Components/Console.py b/lib/python/Components/Console.py index c5fa5f98..f1f3fd95 100644 --- a/lib/python/Components/Console.py +++ b/lib/python/Components/Console.py @@ -8,7 +8,7 @@ class Console(object): self.callbacks = {} self.extra_args = {} - def ePopen(self, cmd, callback, extra_args=[]): + def ePopen(self, cmd, callback=None, extra_args=[]): name = cmd i = 0 while self.appContainers.has_key(name): @@ -21,7 +21,9 @@ class Console(object): self.appContainers[name] = eConsoleAppContainer() self.appContainers[name].dataAvail.append(boundFunction(self.dataAvailCB,name)) self.appContainers[name].appClosed.append(boundFunction(self.finishedCB,name)) - retval = self.appContainers[name].execute(cmd) + if isinstance(cmd, str): # until .execute supports a better api + cmd = [cmd] + retval = self.appContainers[name].execute(*cmd) if retval: self.finishedCB(name, retval) @@ -50,5 +52,6 @@ class Console(object): extra_args = self.extra_args[name] del self.appContainers[name] del self.extra_args[name] - self.callbacks[name](data,retval,extra_args) + if self.callbacks[name]: + self.callbacks[name](data,retval,extra_args) del self.callbacks[name] |
