Fixes issues #496 by having Response.ok catch all Requests exceptions.
authorSteve Pulec <spulec@gmail.com>
Mon, 19 Mar 2012 02:06:42 +0000 (23:06 -0300)
committerSteve Pulec <spulec@gmail.com>
Mon, 19 Mar 2012 02:06:42 +0000 (23:06 -0300)
requests/models.py

index ac1a9e2f43ab7deaf84d7d9e35bca42bcda5a96a..27ad78097d99d743d32fd5736f2a038cacfd7e8d 100644 (file)
@@ -660,7 +660,7 @@ class Response(object):
     def ok(self):
         try:
             self.raise_for_status()
-        except HTTPError:
+        except RequestException:
             return False
         return True