summaryrefslogtreecommitdiffstats
path: root/func/minion/modules/test.py
diff options
context:
space:
mode:
authorMichael DeHaan <mdehaan@redhat.com>2008-01-23 18:51:33 -0500
committerMichael DeHaan <mdehaan@redhat.com>2008-01-23 18:51:33 -0500
commit33c6e4013874878f05eec593d69e8afdeaae212b (patch)
treee84879dd215ac90d20822ab0574dc1ab99b7ed8a /func/minion/modules/test.py
parent19e4d1ba808cbbe95568271a5b0075b8422e4fb6 (diff)
downloadfunc-33c6e4013874878f05eec593d69e8afdeaae212b.tar.gz
func-33c6e4013874878f05eec593d69e8afdeaae212b.tar.xz
func-33c6e4013874878f05eec593d69e8afdeaae212b.zip
Working on async error handling, lots more to do...
(If it hits no exceptions, returns are right, it's the partial error case to deal with next...)
Diffstat (limited to 'func/minion/modules/test.py')
-rw-r--r--func/minion/modules/test.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/func/minion/modules/test.py b/func/minion/modules/test.py
index 6718fed..ed65fd4 100644
--- a/func/minion/modules/test.py
+++ b/func/minion/modules/test.py
@@ -1,5 +1,6 @@
import func_module
import time
+import exceptions
class Test(func_module.FuncModule):
version = "11.11.11"
@@ -7,6 +8,7 @@ class Test(func_module.FuncModule):
description = "Just a very simple example module"
def add(self, numb1, numb2):
+ time.sleep(10)
return numb1 + numb2
def ping(self):
@@ -20,3 +22,9 @@ class Test(func_module.FuncModule):
t = int(t)
time.sleep(t)
return time.time()
+
+ def explode(self):
+ """
+ Testing remote exception handling is useful
+ """
+ raise exceptions.Exception("khhhhhhaaaaaan!!!!!!")