summaryrefslogtreecommitdiffstats
path: root/tasker/plugins.py
diff options
context:
space:
mode:
authorJoel Andres Granados <jgranado@redhat.com>2007-11-20 13:42:44 +0100
committerJoel Andres Granados <jgranado@redhat.com>2007-11-20 13:42:44 +0100
commitd3a483ae41322dd673e76134aaf80c4ce1e84b02 (patch)
treec03a5f2109827fcd3efac4c066424de4165a783b /tasker/plugins.py
parent8aea1940b27a5a25c96d3aba3b8acd5f2d76c3f1 (diff)
downloadfirstaidkit-d3a483ae41322dd673e76134aaf80c4ce1e84b02.tar.gz
firstaidkit-d3a483ae41322dd673e76134aaf80c4ce1e84b02.tar.xz
firstaidkit-d3a483ae41322dd673e76134aaf80c4ce1e84b02.zip
The order is not defined by the internal variables of the Plugin class or the
classes that derive from it. It is defined by the flows defined in the class.
Diffstat (limited to 'tasker/plugins.py')
-rw-r--r--tasker/plugins.py18
1 files changed, 3 insertions, 15 deletions
diff --git a/tasker/plugins.py b/tasker/plugins.py
index 8a86b34..7fe9656 100644
--- a/tasker/plugins.py
+++ b/tasker/plugins.py
@@ -27,7 +27,6 @@ from cStringIO import StringIO
class Plugin(object):
def __init__(self):
- self._diagnosed = False #diagnoistics has not been run yet
self._state = "pre" #state we are in
self._result = True #edge from the state we are in
self._flow = { #define transition rules for state changes
@@ -101,17 +100,12 @@ class Plugin(object):
return True
def diagnose(self):
- self._diagnosed = True
self._result = True #the system is OK
return self._result
def fix(self):
- if not self._diagnosed:
- self._result = False
- return False
-
- self._result = True
- return True
+ self._result = False
+ return False
def describe(self):
self._result = True
@@ -149,15 +143,9 @@ class BinPlugin(Plugin):
return self.common("restore")
def diagnose(self):
- r = self.common("diagnose")
- if r:
- self._diagnosed = True
- return r
+ return self.common("diagnose")
def fix(self):
- if not self._diagnosed:
- self._result = False
- return False
return self.common("fix")
def describe(self):