Skip to content

Commit

Permalink
Fix issue where is_quote_status is true but there is no quoted_status
Browse files Browse the repository at this point in the history
  • Loading branch information
ping committed Mar 29, 2016
1 parent 885051a commit 99e9ceb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion twython/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -597,7 +597,7 @@ def html_for_tweet(tweet, use_display_url=True, use_expanded_url=False, expand_q
text = text.replace(tweet['text'][start:end],
url_html % (entity['url'], shown_url))

if expand_quoted_status and tweet.get('is_quote_status'):
if expand_quoted_status and tweet.get('is_quote_status') and tweet.get('quoted_status'):
quoted_status = tweet['quoted_status']
text += '<blockquote class="twython-quote">%(quote)s<cite><a href="%(quote_tweet_link)s">' \
'<span class="twython-quote-user-name">%(quote_user_name)s</span>' \
Expand Down

0 comments on commit 99e9ceb

Please sign in to comment.