]> jfr.im git - z_archive/twitter.git/commitdiff
fix support of profile_image methods, also using regular post, not multipart
authorRouxRC <redacted>
Sun, 10 Aug 2014 20:53:41 +0000 (22:53 +0200)
committerRouxRC <redacted>
Sun, 10 Aug 2014 20:53:41 +0000 (22:53 +0200)
twitter/api.py

index 4c20a338247225110a2270f9174c0fe676070741..9826c0af1b532d9d263cca57ab4dc23604d29b98 100644 (file)
@@ -210,7 +210,7 @@ class TwitterCall(object):
 
         # Catch media arguments to handle oauth query differently for multipart
         media = None
-        for arg in ['media[]', 'image']:
+        for arg in ['media[]']:
             if arg in kwargs:
                 media = kwargs.pop(arg)
                 if b64_convert:
@@ -221,7 +221,7 @@ class TwitterCall(object):
         # Catch media arguments that are not accepted through multipart
         # and are not yet base64 encoded
         if b64_convert:
-            for arg in ['banner']:
+            for arg in ['banner', 'image']:
                 if arg in kwargs:
                     kwargs[arg] = base64.b64encode(kwargs[arg])