self.response_data = f.read()
else:
self.response_data = data
+ super(TwitterHTTPError, self).__init__(str(self))
def __str__(self):
fmt = ("." + self.format) if self.format else ""
def extend_call(arg):
return self.callable_cls(
auth=self.auth, format=self.format, domain=self.domain,
- callable_cls=self.callable_cls, timeout=self.timeout, uriparts=self.uriparts,
+ callable_cls=self.callable_cls, timeout=self.timeout,
secure=self.secure, gzip=self.gzip,
- (arg,))
+ uriparts=self.uriparts + (arg,))
if k == "_":
return extend_call
else:
secure_str, self.domain, uri, dot, self.format)
headers = {'Accept-Encoding': 'gzip'} if self.gzip else dict()
+ body = None; arg_data = None
if self.auth:
headers.update(self.auth.generate_headers())
arg_data = self.auth.encode_params(uriBase, method, kwargs)
if method == 'GET':
uriBase += '?' + arg_data
- body = None
else:
body = arg_data.encode('utf8')