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:
Den Shabalin
2011-08-19 19:18:26 +03:00
parent efbbb84315
commit 2f55393593
+2 -1
View File
@@ -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."""