From f9fa28c103e0d881d3a91101628ebb883fde6027 Mon Sep 17 00:00:00 2001 From: Frederic Fortier Date: Mon, 29 Jan 2018 23:14:37 -0500 Subject: [PATCH] BLD: created a report with the start and end time of all collected candles --- catalyst/exchange/utils/ccxt_utils.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/catalyst/exchange/utils/ccxt_utils.py b/catalyst/exchange/utils/ccxt_utils.py index cbbf2220..964f966c 100644 --- a/catalyst/exchange/utils/ccxt_utils.py +++ b/catalyst/exchange/utils/ccxt_utils.py @@ -104,7 +104,14 @@ def get_exchange_config(exchange_name, path=None, environ=None, now = pd.Timestamp.utcnow() limit = pd.Timedelta(expiry) if pd.Timedelta(now - last_modified_time(filename)) > limit: - request.urlretrieve(url=url, filename=filename) + try: + request.urlretrieve(url=url, filename=filename) + except Exception as e: + log.warn( + 'unable to update config {} => {}: {}'.format( + url, filename, e + ) + ) else: request.urlretrieve(url=url, filename=filename)