X-Git-Url: https://jfr.im/git/z_archive/twitter.git/blobdiff_plain/8ac8f6bb94866160116f5419ba8899ff787e877c..c7dd86d1ada07b039ca1cefbdbc1d44b3076c7f9:/twitter/api.py diff --git a/twitter/api.py b/twitter/api.py index 6cfc650..2c02790 100644 --- a/twitter/api.py +++ b/twitter/api.py @@ -33,13 +33,14 @@ class TwitterHTTPError(TwitterError): self.uri = uri self.format = format self.uriparts = uriparts + self.response_data = self.e.fp.read() def __str__(self): return ( "Twitter sent status %i for URL: %s.%s using parameters: " "(%s)\ndetails: %s" %( self.e.code, self.uri, self.format, self.uriparts, - self.e.fp.read())) + self.response_data)) class TwitterResponse(object): """ @@ -78,11 +79,6 @@ def wrap_response(response, headers): class WrappedTwitterResponse(response_typ, TwitterResponse): __doc__ = TwitterResponse.__doc__ - def __init__(self, response): - if response_typ is not int: - response_typ.__init__(self, response) - TwitterResponse.__init__(self, headers) - return WrappedTwitterResponse(response)