mirror of
https://github.com/kennethreitz/requests.git
synced 2026-06-05 22:50:18 +00:00
Fixes an issue #128: `Response not working with lxml''. This error happend due to lxml's attempt to do .geturl() call on the response object. __getattr__ didn't raise AttributeError so response.geturl'' returned None and response.geturl()'' resulted into `TypeError: 'NoneType' object is not callable'' seen in the issue.
This commit is contained in:
+2
-1
@@ -416,7 +416,8 @@ class Response(object):
|
||||
except zlib.error:
|
||||
pass
|
||||
return self._content
|
||||
|
||||
else:
|
||||
raise AttributeError
|
||||
|
||||
def raise_for_status(self):
|
||||
"""Raises stored :class:`HTTPError` or :class:`URLError`, if one occured."""
|
||||
|
||||
Reference in New Issue
Block a user