Skip to content

Commit

Permalink
Update set_flair parameter names to match the names in the flairlist …
Browse files Browse the repository at this point in the history
…dictionary.
  • Loading branch information
bboe committed Apr 19, 2012
1 parent a242990 commit f078ef0
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions reddit/__init__.py
Expand Up @@ -410,12 +410,16 @@ def get_stylesheet(self, subreddit):
six.text_type(subreddit))['data']

@reddit.decorators.require_login
def set_flair(self, subreddit, user, text='', css_class=''):
def set_flair(self, subreddit, user, flair_text='', flair_css_class=''):
"""Set flair of user in given subreddit."""
if flair_text == None:
flair_text = ''
if flair_css_class == None:
flair_css_class = ''
params = {'r': six.text_type(subreddit),
'name': six.text_type(user),
'text': text,
'css_class': css_class}
'text': flair_text,
'css_class': flair_css_class}
response = self.request_json(self.config['flair'], params)
stale_url = self.config['flairlist'] % six.text_type(subreddit)
# pylint: disable-msg=E1101,W0212
Expand Down

0 comments on commit f078ef0

Please sign in to comment.