diff options
| author | Martin Sivak <msivak@redhat.com> | 2007-12-19 13:28:18 +0100 |
|---|---|---|
| committer | Martin Sivak <msivak@redhat.com> | 2007-12-19 13:28:18 +0100 |
| commit | a9d245e9ddf98c84825ee5accfffa43a23575c16 (patch) | |
| tree | 61c67a63d0e0e4b98f376188b2622b35ffd51823 /plugins/sample2Plugin.py | |
| parent | 9ab7cc7593030654a67f992ee7775243741baa58 (diff) | |
| download | firstaidkit-a9d245e9ddf98c84825ee5accfffa43a23575c16.tar.gz firstaidkit-a9d245e9ddf98c84825ee5accfffa43a23575c16.tar.xz firstaidkit-a9d245e9ddf98c84825ee5accfffa43a23575c16.zip | |
- Make simple reporting thread in main
- Update reporting to support End-Of-Operations message
- Update main and interpret to send the End-Of-Operations message
- Subclass dict in plugins as Flow and add support for description
- Update example plugins to use Flow instead of pure dictionary
Diffstat (limited to 'plugins/sample2Plugin.py')
| -rw-r--r-- | plugins/sample2Plugin.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/plugins/sample2Plugin.py b/plugins/sample2Plugin.py index e16541a..362e02c 100644 --- a/plugins/sample2Plugin.py +++ b/plugins/sample2Plugin.py @@ -15,7 +15,7 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -from tasker.plugins import Plugin +from tasker.plugins import Plugin,Flow from tasker.returns import * class Sample2Plugin(Plugin): @@ -24,7 +24,7 @@ class Sample2Plugin(Plugin): # Additional flow defprepareion. # flows = {} - flows["extra"] = { + flows["extra"] = Flow({ Plugin.initial: {ReturnValue: "prepare"}, "prepare" : {ReturnValueTrue: "diagnose"}, "diagnose" : {ReturnValueTrue: "clean", ReturnValueFalse: "backup"}, @@ -33,7 +33,7 @@ class Sample2Plugin(Plugin): "fix" : {ReturnValueTrue: "extraStep", ReturnValueFalse: "restore"}, "extraStep" : {ReturnValueTrue: "clean", ReturnValueFalse: "clean"}, "clean" : {ReturnValueTrue: Plugin.final} - } + }, description="Fixing sequence with one added extraStep") default_flow = "extra" name = "Sample2Plugin" |
