Skip to content
Myr

Merge pull request #811 from lucian1900/develop

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Remove exception eating from dispatch_hook.

authored by Kenneth Reitz · committed by Kenneth Reitz · parents 94869e7, 57b4d39 · Browse files · 1 file+3 added−8 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+3 added−8 removed

  • other:+3 added−8 removed

1 file+3 added−8 removed

modified:requests/hooks.py+3 added-8 removed
23 unmodified lines
24 The response generated from a Request.2526"""2728import traceback283029HOOKS = ('args', 'pre_request', 'pre_send', 'post_request', 'response')303132def dispatch_hook(key, hooks, hook_data):
7 unmodified lines
40 if hasattr(hooks, '__call__'):41 hooks = [hooks]4243 for hook in hooks:46 try:47 _hook_data = hook(hook_data)48 if _hook_data is not None:49 hook_data = _hook_data44 _hook_data = hook(hook_data)45 if _hook_data is not None:46 hook_data = _hook_data4751 except Exception:52 traceback.print_exc()4849 return hook_data