From: Steve Pulec Date: Mon, 19 Mar 2012 02:06:42 +0000 (-0300) Subject: Fixes issues #496 by having Response.ok catch all Requests exceptions. X-Git-Tag: v0.11.1~11^2~1^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3c2f52d6813f181fc53b01f67ca25ef1fae0f321;p=services%2Fpython-requests.git Fixes issues #496 by having Response.ok catch all Requests exceptions. --- diff --git a/requests/models.py b/requests/models.py index ac1a9e2..27ad780 100644 --- a/requests/models.py +++ b/requests/models.py @@ -660,7 +660,7 @@ class Response(object): def ok(self): try: self.raise_for_status() - except HTTPError: + except RequestException: return False return True