Skip to content

Commit

Permalink
Fixes an issue psf#128: ``Response not working with lxml''. This erro…
Browse files Browse the repository at this point in the history
…r 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.
  • Loading branch information
densh committed Aug 19, 2011
1 parent efbbb84 commit 2f55393
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion requests/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -416,7 +416,8 @@ def __getattr__(self, name):
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."""
Expand Down

0 comments on commit 2f55393

Please sign in to comment.