|
|
@ -22,7 +22,7 @@ class ExchangeRates(object):
|
|
|
|
try:
|
|
|
|
try:
|
|
|
|
data = requests.get(API_URL).json()
|
|
|
|
data = requests.get(API_URL).json()
|
|
|
|
base, rates = data['base'], data['rates']
|
|
|
|
base, rates = data['base'], data['rates']
|
|
|
|
self.cache[data['date']] = base, rates
|
|
|
|
self.cache[today] = base, rates
|
|
|
|
except Exception as e:
|
|
|
|
except Exception as e:
|
|
|
|
raise ExchangeRatesError(str(e))
|
|
|
|
raise ExchangeRatesError(str(e))
|
|
|
|
return base, rates
|
|
|
|
return base, rates
|
|
|
|