summaryrefslogtreecommitdiffstats
path: root/py3status/modules/bitcoin-price-checker.py
diff options
context:
space:
mode:
authorAndré Doser <doser.andre@gmail.com>2015-01-26 19:05:07 +0100
committerAndré Doser <doser.andre@gmail.com>2015-01-26 19:05:07 +0100
commit4fdaa161e781e47330dea4513804c71a66dcb2d1 (patch)
tree9693be3e0be2532eda886bc04a78fa727fbd963e /py3status/modules/bitcoin-price-checker.py
parentc055b6c7842a48029d3326742d93a4ed685636ac (diff)
last prices dict has to be global
Diffstat (limited to 'py3status/modules/bitcoin-price-checker.py')
-rw-r--r--py3status/modules/bitcoin-price-checker.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/py3status/modules/bitcoin-price-checker.py b/py3status/modules/bitcoin-price-checker.py
index 3549866..6562075 100644
--- a/py3status/modules/bitcoin-price-checker.py
+++ b/py3status/modules/bitcoin-price-checker.py
@@ -18,7 +18,7 @@ class Py3status:
# btc-e, api,bitfinex, bitstamp, bitpay
websites = 'btc-e, bitstamp'
value = 'last'
- cache_timeout = 5
+ cache_timeout = 120
def __init__(self):
self._hoster = {'https://btc-e.com/api/2/btc_usd/ticker': self._get_btce,
@@ -74,6 +74,7 @@ class Py3status:
'cached_until': time() + self.cache_timeout}
rates = []
cnt = 0
+ global lastPrices
for url, f in self._hoster.items():
rgx = re.search('.*//(.*)\..*', url).group(1)
if rgx not in self.websites: