mirror of
https://github.com/wassname/catalyst.git
synced 2026-08-02 12:30:45 +08:00
Merge pull request #1513 from jkleint/patch-1
Propagate exceptions in loader to prevent variable reference before use
This commit is contained in:
@@ -249,6 +249,7 @@ def ensure_benchmark_data(symbol, first_date, last_date, now, trading_day):
|
|||||||
data.to_csv(path)
|
data.to_csv(path)
|
||||||
except (OSError, IOError, HTTPError):
|
except (OSError, IOError, HTTPError):
|
||||||
logger.exception('failed to cache the new benchmark returns')
|
logger.exception('failed to cache the new benchmark returns')
|
||||||
|
raise
|
||||||
if not has_data_for_dates(data, first_date, last_date):
|
if not has_data_for_dates(data, first_date, last_date):
|
||||||
logger.warn("Still don't have expected data after redownload!")
|
logger.warn("Still don't have expected data after redownload!")
|
||||||
return data
|
return data
|
||||||
|
|||||||
Reference in New Issue
Block a user