log: Try to find error in reading reminders
All checks were successful
Build Docker / Build Docker (push) Successful in 16s
All checks were successful
Build Docker / Build Docker (push) Successful in 16s
This commit is contained in:
parent
b6741bbfcf
commit
9db6c0e8b3
@ -28,6 +28,9 @@ def read_reminders():
|
|||||||
reminders = [line.strip().split(',') for line in file.readlines()]
|
reminders = [line.strip().split(',') for line in file.readlines()]
|
||||||
# Remove empty lines
|
# Remove empty lines
|
||||||
reminders = [r for r in reminders if len(r) == 3]
|
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]
|
return [{'user_id': r[0], 'time': r[2], 'text': r[3]} for r in reminders]
|
||||||
except FileNotFoundError:
|
except FileNotFoundError:
|
||||||
return []
|
return []
|
||||||
|
Loading…
Reference in New Issue
Block a user