fix
Signed-off-by: thiswillbeyourgithub <github@32mail.33mail.com>
This commit is contained in:
parent
d12cd8d452
commit
a39683021d
1 changed files with 7 additions and 2 deletions
|
@ -90,10 +90,15 @@ class AlarmApp:
|
|||
self.num_alarms = 0
|
||||
try:
|
||||
with open("alarms.txt", "r") as f:
|
||||
alarms = "".join(f.readlines()).split(";")
|
||||
alarms = f.readlines()[0].split(";")
|
||||
if "" in alarms:
|
||||
alarms.remove("")
|
||||
for alarm in alarms:
|
||||
n = self.num_alarms
|
||||
self.alarms[n][:] = map(int, alarm.split(","))
|
||||
h, m, st = map(int, alarm.split(","))
|
||||
self.alarms[n][0] = h
|
||||
self.alarms[n][1] = m
|
||||
self.alarms[n][2] = st
|
||||
self.num_alarms += 1
|
||||
except Exception:
|
||||
pass
|
||||
|
|
Loading…
Reference in a new issue