Set 'currency' to 'usd' if fallback has been used

This commit is contained in:
Nils Schweinsberg 2017-10-15 04:03:30 +02:00
parent 4da84cb452
commit 1e13cb5a37

View File

@ -61,8 +61,9 @@ class Coins(Plugin):
data = get_data(currency) data = get_data(currency)
if not data and currency != 'usd': if not data and currency != 'usd':
data = get_data('usd') data = get_data('usd')
currency = 'usd'
if not data: 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] to_currency = self.CURRENCIES[currency]