git.cweiske.de
/
enigma2.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
hand over extra_args to finished callback for eBatch calls
[enigma2.git]
/
lib
/
python
/
Components
/
Console.py
diff --git
a/lib/python/Components/Console.py
b/lib/python/Components/Console.py
index b03482409934a1670c9d5ddaaa4a9baae3677fc5..c5fa5f9810456c3ec051e4146c3edeb3e3f46ca8 100644
(file)
--- 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)
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.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:
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)
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:
else:
- callback()
+ callback(
extra_args
)
def dataAvailCB(self, name, data):
self.appResults[name] += data
def dataAvailCB(self, name, data):
self.appResults[name] += data