Skip to content

Commit

Permalink
Merge pull request #411 from ping/quoted-status-patch2
Browse files Browse the repository at this point in the history
Fix issue where is_quote_status is true but there is no quoted_status
  • Loading branch information
michaelhelmick committed Apr 30, 2016
2 parents 885051a + 99e9ceb commit 6cd13d7
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 6cd13d7

Please sign in to comment.