]> jfr.im git - z_archive/twitter.git/blobdiff - twitter/api.py
Clarify the comment about edge cases.
[z_archive/twitter.git] / twitter / api.py
index 6481d3292b5a7bd6a376806e9324e1f774880beb..0e4377d930b01d2a2a0c9bc82c4f8aa8731a0c49 100644 (file)
@@ -146,9 +146,9 @@ class TwitterCall(object):
             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:
@@ -196,12 +196,12 @@ class TwitterCall(object):
                     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')