Remove exception eating from dispatch_hook.
authorLucian Branescu Mihaila <lucian.branescu@gmail.com>
Thu, 16 Aug 2012 15:49:00 +0000 (17:49 +0200)
committerLucian Branescu Mihaila <lucian.branescu@gmail.com>
Thu, 16 Aug 2012 15:49:00 +0000 (17:49 +0200)
requests/hooks.py

index 272abb73a6c8ea854f0388e4cbb3f56686f988e7..cf902cb90a547209d9a5f7e01d90773f51932017 100644 (file)
@@ -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