Skip to content

Commit

Permalink
[web] Add a dont_decode argument to get() for modules who wants bytes
Browse files Browse the repository at this point in the history
This fixes a regression in calc.py Wolfram Alpha feature caused by
c33f8f1

I still think c33f8f1 was a good thing to do
  • Loading branch information
Elad Alfassa committed May 3, 2014
1 parent 5528b8e commit bc7eb91
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion calc.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,8 @@ def wa(bot, trigger):
query = trigger.group(2)
uri = 'http://tumbolia.appspot.com/wa/'
try:
answer = web.get(uri + web.quote(query).replace('+', '%2B'), 45)
answer = web.get(uri + web.quote(query).replace('+', '%2B'), 45,
dont_decode=True)
except timeout as e:
return bot.say('[WOLFRAM ERROR] Request timed out')
if answer:
Expand Down

0 comments on commit bc7eb91

Please sign in to comment.