From af084e3e5d342c41df72eecf1eaf15402ee9d427 Mon Sep 17 00:00:00 2001 From: tim Date: Mon, 5 Aug 2024 02:11:58 -0400 Subject: [PATCH] final ohlc bugfix --- src/dexorder/final_ohlc.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/dexorder/final_ohlc.py b/src/dexorder/final_ohlc.py index 439a3a0..f735c4d 100644 --- a/src/dexorder/final_ohlc.py +++ b/src/dexorder/final_ohlc.py @@ -287,10 +287,11 @@ class OHLCFileSeries: os.makedirs(os.path.dirname(quote_filename), exist_ok=True) self.quote_file = open(quote_filename, 'bw') line = None - try: - start, old_time, old_price = line.split(',') - except ValueError: - line = None + if line: + try: + start, old_time, old_price = line.split(',') + except ValueError: + line = None if line: # noinspection PyUnboundLocalVariable self.series_start = from_timestamp(int(start))