diff --git a/timeparser.py b/timeparser.py index 55271a1..53302dc 100644 --- a/timeparser.py +++ b/timeparser.py @@ -26,6 +26,8 @@ def read_reminders(): try: with open(REMINDERS_FILE_PATH, 'r') as file: reminders = [line.strip().split(',') for line in file.readlines()] + # Remove empty lines + reminders = [r for r in reminders if len(r) == 3] return [{'user_id': r[0], 'time': r[2], 'text': r[3]} for r in reminders] except FileNotFoundError: return []