From 049166d6c95184f726f9b310520d7440b721d392 Mon Sep 17 00:00:00 2001 From: Pavol Rusnak Date: Sun, 22 Feb 2015 14:38:33 +0100 Subject: [PATCH] disable filecache by default --- setup.py | 2 +- trezorlib/tx_api.py | 9 +++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/setup.py b/setup.py index a34688349..f10eb57f7 100755 --- a/setup.py +++ b/setup.py @@ -3,7 +3,7 @@ from setuptools import setup setup( name='trezor', - version='0.6.2', + version='0.6.3', author='Bitcoin TREZOR', author_email='info@bitcointrezor.com', description='Python library for communicating with TREZOR Bitcoin Hardware Wallet', diff --git a/trezorlib/tx_api.py b/trezorlib/tx_api.py index 553265163..581641135 100644 --- a/trezorlib/tx_api.py +++ b/trezorlib/tx_api.py @@ -3,13 +3,14 @@ import urllib2 import json from decimal import Decimal try: - from filecache import filecache, MONTH + raise Exception() # remove this line to enable caching + from filecache import filecache, DAY except: def filecache(x): def _inner(y): return y return _inner - MONTH = None + DAY = None import types_pb2 as proto_types @@ -89,14 +90,14 @@ def insight_tx(url): class TXAPIBitcoin(object): - @filecache(MONTH) + @filecache(DAY) def get_tx(self, txhash): url = 'https://insight.bitpay.com/api/tx/%s' % txhash return insight_tx(url) class TXAPITestnet(object): - @filecache(MONTH) + @filecache(DAY) def get_tx(self, txhash): url = 'https://test-insight.bitpay.com/api/tx/%s' % txhash return insight_tx(url)