From 4e3c9de1d0ca298dc8180eaa332c5028bf81fc2d Mon Sep 17 00:00:00 2001 From: ecdsa Date: Tue, 12 Mar 2013 22:56:58 +0100 Subject: [PATCH] catch http exception --- gui/exchange_rate.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gui/exchange_rate.py b/gui/exchange_rate.py index c9cd7a79f..cbfa9ca7b 100644 --- a/gui/exchange_rate.py +++ b/gui/exchange_rate.py @@ -36,7 +36,10 @@ class Exchanger(threading.Thread): response = connection.getresponse() if response.reason == httplib.responses[httplib.NOT_FOUND]: return - response = json.loads(response.read()) + try: + response = json.loads(response.read()) + except: + return quote_currencies = {} try: for r in response: