From: Lucian Ursu Date: Tue, 10 Jan 2012 10:10:58 +0000 (+0200) Subject: Printing the entire traceback, instead of just a warning, when an exception is encoun... X-Git-Tag: v0.9.2~13^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=86eba21b8ae7ed3772f5706e1c5799efc127342b;p=services%2Fpython-requests.git Printing the entire traceback, instead of just a warning, when an exception is encountered --- diff --git a/requests/hooks.py b/requests/hooks.py index f9cf480..37f87d9 100644 --- a/requests/hooks.py +++ b/requests/hooks.py @@ -22,7 +22,7 @@ Available hooks: """ -import warnings +import traceback def dispatch_hook(key, hooks, hook_data): @@ -34,7 +34,7 @@ def dispatch_hook(key, hooks, hook_data): try: return hooks.get(key).__call__(hook_data) or hook_data - except Exception, why: - warnings.warn(str(why)) + except Exception: + traceback.print_exc() return hook_data