Skip to content

Commit

Permalink
Merge pull request #381 from bradarv90/master
Browse files Browse the repository at this point in the history
Fix for issue #380
  • Loading branch information
bboe committed Apr 5, 2015
2 parents fc9bf60 + 5c9ffdb commit e7b90bb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions praw/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2196,11 +2196,11 @@ def submit(self, subreddit, title, text=None, url=None, captcha=None,
can access it. Otherwise, return the url to the submission.
"""
if bool(text) == bool(url):
if text is None and bool(text) == bool(url):
raise TypeError('One (and only one) of text or url is required!')
data = {'sr': six.text_type(subreddit),
'title': title}
if text:
if text or text == '':
data['kind'] = 'self'
data['text'] = text
else:
Expand Down

0 comments on commit e7b90bb

Please sign in to comment.