From bbe9498d9d9be53822c4dbf5d02478de3cd3c198 Mon Sep 17 00:00:00 2001 From: Ace Date: Mon, 24 Jun 2024 02:47:21 +0200 Subject: [PATCH] fix output of rtc_alarm_set --- inkycal/utils/pisugar.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/inkycal/utils/pisugar.py b/inkycal/utils/pisugar.py index 5062643..48cdf8d 100644 --- a/inkycal/utils/pisugar.py +++ b/inkycal/utils/pisugar.py @@ -140,8 +140,7 @@ class PiSugar: iso_format = time.isoformat() result = self._get_output("rtc_alarm_set", f"{iso_format } {repeat}") if result: - second_line = result.splitlines()[1] - status = second_line.split('rtc_alarm_set: ')[1].strip() + status = result.split('rtc_alarm_set: ')[1].strip() if status == "done": return True return False