From 9db6c0e8b3a13e2c19827a2ac0643d5e959f898c Mon Sep 17 00:00:00 2001 From: Nathan Woodburn Date: Tue, 14 Nov 2023 13:29:27 +1100 Subject: [PATCH] log: Try to find error in reading reminders --- timeparser.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/timeparser.py b/timeparser.py index 53302dc..2f7e570 100644 --- a/timeparser.py +++ b/timeparser.py @@ -28,6 +28,9 @@ def read_reminders(): reminders = [line.strip().split(',') for line in file.readlines()] # Remove empty lines reminders = [r for r in reminders if len(r) == 3] + print(reminders,flush=True) + if len(reminders) == 0: + return [] return [{'user_id': r[0], 'time': r[2], 'text': r[3]} for r in reminders] except FileNotFoundError: return []