Skip to content

Commit

Permalink
Merge pull request #369 from Deimos/captcha-updates
Browse files Browse the repository at this point in the history
Update captcha requirements
  • Loading branch information
bboe committed Mar 26, 2015
2 parents dd83c2f + b2c59e4 commit fac4c44
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions praw/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -698,8 +698,7 @@ def __init__(self, *args, **kwargs):
super(UnauthenticatedReddit, self).__init__(*args, **kwargs)
self._random_count = 0

@decorators.require_captcha
def create_redditor(self, user_name, password, email='', captcha=None):
def create_redditor(self, user_name, password, email=''):
"""Register a new user.
:returns: The json response from the server.
Expand All @@ -709,8 +708,6 @@ def create_redditor(self, user_name, password, email='', captcha=None):
'passwd': password,
'passwd2': password,
'user': user_name}
if captcha:
data.update(captcha)
return self.request_json(self.config['register'], data=data)

@decorators.deprecated(msg="Please use `get_comments(\'all\', ...)` "
Expand Down Expand Up @@ -1430,10 +1427,11 @@ class ModConfigMixin(AuthenticatedReddit):
"""

@decorators.restrict_access(scope='modconfig', mod=False, login=True)
@decorators.require_captcha
def create_subreddit(self, name, title, description='', language='en',
subreddit_type='public', content_options='any',
over_18=False, default_set=True, show_media=False,
domain='', wikimode='disabled'):
domain='', wikimode='disabled', captcha=None):
"""Create a new subreddit.
:returns: The json response from the server.
Expand All @@ -1450,6 +1448,8 @@ def create_subreddit(self, name, title, description='', language='en',
'show_media': 'on' if show_media else 'off',
'wikimode': wikimode,
'domain': domain}
if captcha:
data.update(captcha)
return self.request_json(self.config['site_admin'], data=data)

@decorators.restrict_access(scope='modconfig')
Expand Down

0 comments on commit fac4c44

Please sign in to comment.