Skip to content

Commit

Permalink
Fixed error message variable in Jinja to unpack correct number of arg…
Browse files Browse the repository at this point in the history
…uments -- displays flash message from flask_server on TweepError.
  • Loading branch information
bookstein committed Dec 3, 2014
1 parent 50ac2ee commit b1e7acc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion flask_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ def handle_error(e):
if e.args[0][0]['code'] == "88":
return "Rate limit exceeded: please wait a few minutes to retry."
else:
return "Error: We encountered an error while contacting Twitter: \n"
return "Error: We encountered an error while contacting Twitter \n"
+ e.args[0][0]["message"]


Expand Down
2 changes: 1 addition & 1 deletion templates/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ <h5 class="text-left">How political are Twitter friends? Enter any Twitter handl
{% with messages = get_flashed_messages() %}
{% if messages %}
<ul class="flashes">
{% for category, message in messages %}
{% for message in messages %}
<li class="{{ category }}">{{ message }}</li>
{% endfor %}
</ul>
Expand Down

0 comments on commit b1e7acc

Please sign in to comment.