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))