From 639980ced616de9a208e20fb20ae47b4f6545121 Mon Sep 17 00:00:00 2001 From: Josh Roesslein Date: Wed, 14 Oct 2009 11:18:17 -0500 Subject: [PATCH] Fix image upload methods. --- tweepy/api.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/tweepy/api.py b/tweepy/api.py index d4020a6..a0d73fa 100644 --- a/tweepy/api.py +++ b/tweepy/api.py @@ -619,7 +619,7 @@ class API(object): http://apiwiki.twitter.com/Twitter-REST-API-Method%3A-account%C2%A0update_profile_image """ def update_profile_image(self, filename): - headers, post_data = _pack_image(filename, 700) + headers, post_data = API._pack_image(filename, 700) bind_api( path = '/account/update_profile_image.json', method = 'POST', @@ -639,7 +639,7 @@ class API(object): http://apiwiki.twitter.com/Twitter-REST-API-Method%3A-account%C2%A0update_profile_background_image """ def update_profile_background_image(self, filename, *args, **kargs): - headers, post_data = _pack_image(filename, 800) + headers, post_data = API._pack_image(filename, 800) bind_api( path = '/account/update_profile_background_image.json', method = 'POST', @@ -800,14 +800,14 @@ class API(object): http://apiwiki.twitter.com/Twitter+REST+API+Method%3A-blocks-exists """ - def exists_block(self, **kargs): + def exists_block(self, *args, **kargs): try: bind_api( path = '/blocks/exists.json', parser = parse_none, allowed_param = ['id', 'user_id', 'screen_name'], require_auth = True - )(self, **kargs) + )(self, *args, **kargs) except TweepError: return False @@ -1026,6 +1026,7 @@ class API(object): """ Internal use only """ + @staticmethod def _pack_image(filename, max_size): """Pack image from file into multipart-formdata post body""" # image must be less than 700kb in size -- 2.25.1