From 234a55da6a23f61591d0cb3267f15c529d8fab2f Mon Sep 17 00:00:00 2001 From: jkleint Date: Mon, 18 Jun 2012 17:26:42 -0300 Subject: [PATCH] Update raise_for_status() exception output to reflect that requests.exceptions.HTTPError is raised, not urllib2.HTTPError. --- docs/user/quickstart.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/user/quickstart.rst b/docs/user/quickstart.rst index 316d9a1..87a6690 100644 --- a/docs/user/quickstart.rst +++ b/docs/user/quickstart.rst @@ -256,9 +256,9 @@ If we made a bad request (non-200 response), we can raise it with >>> _r.raise_for_status() Traceback (most recent call last): - File "requests/models.py", line 394, in raise_for_status - raise self.error - urllib2.HTTPError: HTTP Error 404: NOT FOUND + File "requests/models.py", line 832, in raise_for_status + raise http_error + requests.exceptions.HTTPError: 404 Client Error But, since our ``status_code`` for ``r`` was ``200``, when we call ``raise_for_status()`` we get:: -- 2.7.4