From ebb5d9121363a8c0ab87cffb9767cb2a1f96e95d Mon Sep 17 00:00:00 2001 From: root Date: Sat, 28 Jul 2018 14:50:05 +0000 Subject: [PATCH] Fix local monero --- price.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/price.py b/price.py index 4578955..ab0813e 100644 --- a/price.py +++ b/price.py @@ -788,14 +788,10 @@ def xmy(bot, trigger): @sopel.module.commands('localmonero', 'localxmr', 'lxmr', 'lm', 'street') def localmonero(bot, trigger): - stringtosay = '' try: r = requests.get(localmonerousd) j = r.json() - stringtosay += "LocalMonero XMR/USD 1h-avg: ${0:.2f}, 6h-avg: ${0:.2f}, 12h-avg: ${0:.2f}, 24h-avg: ${0:.2f}.".format(float(j['USD']['avg_1h']), float(j['USD']['avg_6h']), float(j['USD']['avg_12h']), float(j['USD']['avg_24h'])) - except: - bot.say("Error getting XMR/USD data") - try: + stringtosay = "LocalMonero XMR/USD 12h-avg: ${0:.2f}, 24h-avg: ${0:.2f}.".format(float(j['USD']['avg_12h']), float(j['USD']['avg_24h'])) bot.say(stringtosay) except: bot.say("Error getting data")