diff options
| author | Felix Domke <tmbinc@elitedvb.net> | 2008-04-28 22:40:27 +0000 |
|---|---|---|
| committer | Felix Domke <tmbinc@elitedvb.net> | 2008-04-28 22:40:27 +0000 |
| commit | ec89ab8c888d45c819f65cfb4d9750349149aa5c (patch) | |
| tree | 96e98daa7c44bafb4db174762d024d225d47b765 /lib/python/Components/Task.py | |
| parent | 4d7c619a4cc127d908c03780b6a6dca68d196ae3 (diff) | |
| download | enigma2-ec89ab8c888d45c819f65cfb4d9750349149aa5c.tar.gz enigma2-ec89ab8c888d45c819f65cfb4d9750349149aa5c.zip | |
ToolExistsPrecondition, ReturncodePostcondition are usable already
Diffstat (limited to 'lib/python/Components/Task.py')
| -rw-r--r-- | lib/python/Components/Task.py | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/lib/python/Components/Task.py b/lib/python/Components/Task.py index 1db19f76..fe81005b 100644 --- a/lib/python/Components/Task.py +++ b/lib/python/Components/Task.py @@ -200,15 +200,15 @@ class JobManager: # def check(self, task): # return getFreeDiskspace(task.workspace) >= self.diskspace_required # -#class ToolExistsPrecondition: -# def check(self, task): -# import os -# return os.access(task.cmd, os.X_OK) -# -#class ReturncodePostcondition: -# def check(self, task): -# return task.returncode == 0 -# +class ToolExistsPrecondition: + def check(self, task): + import os + return os.access(task.cmd, os.X_OK) + +class ReturncodePostcondition: + def check(self, task): + return task.returncode == 0 + #class HDDInitJob(Job): # def __init__(self, device): # Job.__init__(self, _("Initialize Harddisk")) |
