From 3c2f52d6813f181fc53b01f67ca25ef1fae0f321 Mon Sep 17 00:00:00 2001 From: Steve Pulec Date: Sun, 18 Mar 2012 23:06:42 -0300 Subject: [PATCH] Fixes issues #496 by having Response.ok catch all Requests exceptions. --- requests/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- 2.34.1