From 57b4d39749021305a2d5850e642537224d30611f Mon Sep 17 00:00:00 2001 From: Lucian Branescu Mihaila Date: Thu, 16 Aug 2012 17:49:00 +0200 Subject: [PATCH] Remove exception eating from dispatch_hook. --- requests/hooks.py | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/requests/hooks.py b/requests/hooks.py index 272abb73..cf902cb9 100644 --- a/requests/hooks.py +++ b/requests/hooks.py @@ -25,8 +25,6 @@ Available hooks: """ -import traceback - HOOKS = ('args', 'pre_request', 'pre_send', 'post_request', 'response') @@ -42,12 +40,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