From 79e5dec8134ff0e916ce271da43da208adc7c7f3 Mon Sep 17 00:00:00 2001 From: Victor Grau Serrat Date: Tue, 19 Dec 2017 14:05:45 +0100 Subject: [PATCH] BUG: minor fix in Poloniex curate script --- catalyst/curate/poloniex.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/catalyst/curate/poloniex.py b/catalyst/curate/poloniex.py index 572cd777..a46dbf81 100644 --- a/catalyst/curate/poloniex.py +++ b/catalyst/curate/poloniex.py @@ -181,8 +181,9 @@ class PoloniexCurator(object): our existing TradeHistory until the first transaction for this currencyPair ''' - try: - if( 'end_file' in locals() and end_file + 3600 < end): + try: + if(temp is not None + or ('end_file' in locals() and end_file + 3600 < end)): if (temp is None): temp = os.tmpfile() tempcsv = csv.writer(temp)