From a9d245e9ddf98c84825ee5accfffa43a23575c16 Mon Sep 17 00:00:00 2001 From: Martin Sivak Date: Wed, 19 Dec 2007 13:28:18 +0100 Subject: - 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 --- plugins/sample2Plugin.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'plugins/sample2Plugin.py') 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" -- cgit