1
0
Fork 0

fix: don't erase previous alarm if none loaded

Signed-off-by: thiswillbeyourgithub <github@32mail.33mail.com>
This commit is contained in:
thiswillbeyourgithub 2022-07-20 18:14:32 +02:00
parent 040edba1f7
commit 20027dc16a

View file

@ -140,6 +140,8 @@ class AlarmApp:
self._set_pending_alarms()
try:
if self.num_alarms == 0:
return
with open("alarms", "w") as f:
for n in range(self.num_alarms):
al = self.alarms[n]