fix execute string for tasks
[enigma2.git] / lib / python / Components / Task.py
index 022ca1f14d90076fc32d5a126353b9c8cbbfe66a..c152e9a28ac4077bb9fb5e008bd7ac5210edf1d9 100644 (file)
@@ -136,7 +136,6 @@ class Task(object):
 
        def setTool(self, tool):
                self.cmd = tool
-               self.args = [tool]
                self.global_preconditions.append(ToolExistsPrecondition())
                self.postconditions.append(ReturncodePostcondition())
 
@@ -162,9 +161,9 @@ class Task(object):
                self.task_progress_changed = task_progress_changed
                from enigma import eConsoleAppContainer
                self.container = eConsoleAppContainer()
-               self.container.appClosed.get().append(self.processFinished)
-               self.container.stdoutAvail.get().append(self.processStdout)
-               self.container.stderrAvail.get().append(self.processStderr)
+               self.container.appClosed.append(self.processFinished)
+               self.container.stdoutAvail.append(self.processStdout)
+               self.container.stderrAvail.append(self.processStderr)
 
                assert self.cmd is not None
                assert len(self.args) >= 1
@@ -172,7 +171,7 @@ class Task(object):
                if self.cwd is not None:
                        self.container.setCWD(self.cwd)
 
-               execstr = self.cmd + " ".join(self.args)
+               #execstr = " ".join([self.cmd]+self.args)
                print "execute:", self.container.execute(execstr), execstr
                if self.initial_input:
                        self.writeInput(self.initial_input)