From bc7eb91f2a5371db44cca37c018298217d0ed265 Mon Sep 17 00:00:00 2001 From: Elad Alfassa Date: Sat, 3 May 2014 13:28:31 +0300 Subject: [PATCH] [web] Add a dont_decode argument to get() for modules who wants bytes This fixes a regression in calc.py Wolfram Alpha feature caused by c33f8f1f90 I still think c33f8f1f90 was a good thing to do --- calc.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/calc.py b/calc.py index a60610b1c4..6c483105ac 100644 --- a/calc.py +++ b/calc.py @@ -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: