1
0
Fork 0
Signed-off-by: thiswillbeyourgithub <github@32mail.33mail.com>
This commit is contained in:
thiswillbeyourgithub 2022-07-25 22:04:10 +02:00
parent d12cd8d452
commit a39683021d

View file

@ -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