diff options
| author | Joel Andres Granados <jgranado@redhat.com> | 2007-11-20 13:48:26 +0100 |
|---|---|---|
| committer | Joel Andres Granados <jgranado@redhat.com> | 2007-11-20 13:48:26 +0100 |
| commit | 568b29eab782ebebe0fbae90cb3e2ca83f897977 (patch) | |
| tree | 5008f1585c43c7a900d99078a9a41ef53657999c /tasker/plugins.py | |
| parent | d3a483ae41322dd673e76134aaf80c4ce1e84b02 (diff) | |
| download | firstaidkit-568b29eab782ebebe0fbae90cb3e2ca83f897977.tar.gz firstaidkit-568b29eab782ebebe0fbae90cb3e2ca83f897977.tar.xz firstaidkit-568b29eab782ebebe0fbae90cb3e2ca83f897977.zip | |
A little documentation.
Diffstat (limited to 'tasker/plugins.py')
| -rw-r--r-- | tasker/plugins.py | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/tasker/plugins.py b/tasker/plugins.py index 7fe9656..d9ef0ce 100644 --- a/tasker/plugins.py +++ b/tasker/plugins.py @@ -84,33 +84,44 @@ class Plugin(object): #default (mandatory) plugin actions def init(self): + """Initial actions. + + All the actions that must be done before the execution of any plugin function. + This function generaly addresses things that are global to the plugin. + """ self._result = True return True def destroy(self): + """Final actions. + + All the actions that must be done after the exection of all plugin functions. + This function generaly addresses things that are global and need to be closed + off, like file descriptos, or mounted partitions.... + """ self._result = True return True def backup(self): + """Gather important information needed for restore.""" self._result = True return True def restore(self): + """Try to restore the previous state described in backup.""" self._result = True return True def diagnose(self): + """Diagnose the situation.""" self._result = True #the system is OK return self._result def fix(self): + """Try to fix whatever is wrong in the system.""" self._result = False return False - def describe(self): - self._result = True - return "" - class BinPlugin(Plugin): def __init__(self, bin): Plugin.__init__(self) |
