fix: typo in reminders count
All checks were successful
Build Docker / Build Docker (push) Successful in 17s
All checks were successful
Build Docker / Build Docker (push) Successful in 17s
This commit is contained in:
parent
9db6c0e8b3
commit
65d7252f5f
@ -28,10 +28,13 @@ 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]
|
||||
return [{
|
||||
'user_id': r[0],
|
||||
'time': r[1],
|
||||
'text': r[2]
|
||||
} for r in reminders]
|
||||
except FileNotFoundError:
|
||||
return []
|
||||
|
||||
@ -61,3 +64,6 @@ if __name__ == '__main__':
|
||||
print(parse_time('1h'))
|
||||
print(parse_time('1m 2s'))
|
||||
print(parse_time('1m'))
|
||||
print(read_reminders())
|
||||
store_reminder(123, datetime.datetime.now(), 'test')
|
||||
print(read_reminders())
|
Loading…
Reference in New Issue
Block a user