Subliminal update

This commit is contained in:
Ruud
2012-10-14 17:58:09 +02:00
parent 4dfd8b4cd5
commit 67c87444de
163 changed files with 22377 additions and 804 deletions
+4 -8
View File
@@ -25,11 +25,10 @@ Available hooks:
"""
import traceback
HOOKS = ('args', 'pre_request', 'pre_send', 'post_request', 'response')
def dispatch_hook(key, hooks, hook_data):
"""Dispatches a hook dictionary on a given piece of data."""
@@ -42,12 +41,9 @@ def dispatch_hook(key, hooks, hook_data):
hooks = [hooks]
for hook in hooks:
try:
_hook_data = hook(hook_data)
if _hook_data is not None:
hook_data = _hook_data
_hook_data = hook(hook_data)
if _hook_data is not None:
hook_data = _hook_data
except Exception:
traceback.print_exc()
return hook_data