diff options
| author | Andreas Frisch <andreas.frisch@multimedia-labs.de> | 2008-10-29 17:56:55 +0000 |
|---|---|---|
| committer | Andreas Frisch <andreas.frisch@multimedia-labs.de> | 2008-10-29 17:56:55 +0000 |
| commit | 6bb94cd5b0d8fd3608afe84e8d76aef554a4b401 (patch) | |
| tree | 6c3547a66083fce6bd2f2e1b152a9e6fd53155ff /lib/python/Components/Console.py | |
| parent | 25a66e5ff609eeb03907030f16c408197b646ecc (diff) | |
| download | enigma2-6bb94cd5b0d8fd3608afe84e8d76aef554a4b401.tar.gz enigma2-6bb94cd5b0d8fd3608afe84e8d76aef554a4b401.zip | |
hand over extra_args to finished callback for eBatch calls
Diffstat (limited to 'lib/python/Components/Console.py')
| -rw-r--r-- | lib/python/Components/Console.py | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/lib/python/Components/Console.py b/lib/python/Components/Console.py index b0348240..c5fa5f98 100644 --- a/lib/python/Components/Console.py +++ b/lib/python/Components/Console.py @@ -25,20 +25,20 @@ class Console(object): if retval: self.finishedCB(name, retval) - def eBatch(self, cmds, callback, debug=False): + def eBatch(self, cmds, callback, extra_args=[], debug=False): self.debug = debug cmd = cmds.pop(0) - self.ePopen(cmd, self.eBatchCB, [cmds, callback, cmd]) + self.ePopen(cmd, self.eBatchCB, [cmds, callback, extra_args]) - def eBatchCB(self, data, retval, extra_args): - (cmds, callback, lastcmd) = extra_args + def eBatchCB(self, data, retval, _extra_args): + (cmds, callback, extra_args) = _extra_args if self.debug: - print '[eBatch] cmd="%s", retval=%s, cmds left=%d, data:\n%s' % (lastcmd, retval, len(cmds), data) + print '[eBatch] retval=%s, cmds left=%d, data:\n%s' % (retval, len(cmds), data) if len(cmds): cmd = cmds.pop(0) - self.ePopen(cmd, self.eBatchCB, [cmds, callback, cmd]) + self.ePopen(cmd, self.eBatchCB, [cmds, callback, extra_args]) else: - callback() + callback(extra_args) def dataAvailCB(self, name, data): self.appResults[name] += data |
