From 1e13cb5a37feba89f010469d362dadb2bb811f39 Mon Sep 17 00:00:00 2001 From: Nils Schweinsberg Date: Sun, 15 Oct 2017 04:03:30 +0200 Subject: [PATCH] Set 'currency' to 'usd' if fallback has been used --- bot/coins.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bot/coins.py b/bot/coins.py index b0148ce..e1a0df8 100644 --- a/bot/coins.py +++ b/bot/coins.py @@ -61,8 +61,9 @@ class Coins(Plugin): data = get_data(currency) if not data and currency != 'usd': data = get_data('usd') + currency = 'usd' if not data: - return '\x02[{}]\x02 No data received for currency {}'.format(crypto, currency) + return '\x02[{}]\x02 No data received'.format(crypto) to_currency = self.CURRENCIES[currency]