diff options
| author | Andreas Frisch <andreas.frisch@multimedia-labs.de> | 2008-06-18 08:22:13 +0000 |
|---|---|---|
| committer | Andreas Frisch <andreas.frisch@multimedia-labs.de> | 2008-06-18 08:22:13 +0000 |
| commit | 98f7390aeb2c7b1ef3963fef83a6eeae367256a6 (patch) | |
| tree | 4b9f5b9425969afc0b95a55a8258b325c90ac65c /lib | |
| parent | c8845a8bb1f5a3e3e67f6d21f18afed0ffbf564b (diff) | |
| download | enigma2-98f7390aeb2c7b1ef3963fef83a6eeae367256a6.tar.gz enigma2-98f7390aeb2c7b1ef3963fef83a6eeae367256a6.zip | |
fix off-by-one error on the progress and fix vars in ToolExistsPrecondition
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/python/Components/Task.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/python/Components/Task.py b/lib/python/Components/Task.py index 76d4f157..07b9d3f5 100644 --- a/lib/python/Components/Task.py +++ b/lib/python/Components/Task.py @@ -53,7 +53,7 @@ class Job(object): self.state_changed() self.runNext() sumTaskWeightings = sum([t.weighting for t in self.tasks]) - self.weightScale = (self.end+1) / float(sumTaskWeightings) + self.weightScale = self.end / float(sumTaskWeightings) def runNext(self): if self.current_task == len(self.tasks): @@ -89,7 +89,7 @@ class Job(object): # some Jobs might have a better idea of how to cancel a job self.abort() -class Task(object) : +class Task(object): def __init__(self, job, name): self.name = name self.immediate_preconditions = [ ] @@ -323,7 +323,7 @@ class ToolExistsPrecondition(Condition): if task.cmd[0]=='/': realpath = task.cmd else: - realpath = self.cwd + '/' + self.cmd + realpath = task.cwd + '/' + task.cmd self.realpath = realpath return os.access(realpath, os.X_OK) |
