From 33c6e4013874878f05eec593d69e8afdeaae212b Mon Sep 17 00:00:00 2001 From: Michael DeHaan Date: Wed, 23 Jan 2008 18:51:33 -0500 Subject: 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...) --- func/minion/modules/test.py | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'func/minion/modules/test.py') 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!!!!!!") -- cgit