health reminder syntax fix 2

This commit is contained in:
Lennart J. Kurzweg (Nx2)
2024-11-21 22:33:47 +01:00
parent 9c2a69aa03
commit f8497f5538

View File

@@ -12,7 +12,9 @@ lib.mkIf (host != "NxACE")
}; };
systemd.user.services."health_reminder" = let systemd.user.services."health_reminder" = let
hm = pkgs.writers.writePython3Bin "health_reminder" {} /*python*/ '' hm = pkgs.writers.writePython3Bin "health_reminder" {
flakeIgnore = [ "E302" "E305" "E226" "E501" ];
} /*python*/ ''
import random import random
import re import re
@@ -24,10 +26,10 @@ lib.mkIf (host != "NxACE")
def __str__(self): def __str__(self):
try: try:
choice = random.choice(self.options) choice = random.choice(self.options)
except IndexError: except IndexError:
choice = "" choice = ""
action = re.sub("%o", choice, self.action) action = re.sub("%o", choice, self.action)
return action return action