diff options
Diffstat (limited to 'climl/__init__.py')
-rw-r--r-- | climl/__init__.py | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/climl/__init__.py b/climl/__init__.py index 147dfc3..e46baab 100644 --- a/climl/__init__.py +++ b/climl/__init__.py @@ -8,22 +8,19 @@ import os def on_email(content, hooks, conf): #print('on_email:', content) - class Context(dict): - def __init__(self): - self.conf = conf + context = dict( + conf=conf, + rawcontent=content, + ) - context = Context() try: for hook in hooks: print('on_email, calling hook {}'.format(hook.__name__)) - context2, content2 = hook(context, content) - if context2: - context = context2 - if content2: - content = content2 + hook(context) + print('on_email, end of hook {}'.format(hook.__name__)) except interface.HookStopIteration: pass - print('now, raising exception') + print('now, raising exception (for dev purpose only)') raise interface.HookAbortError() |