health reminder syntax fix 2
This commit is contained in:
@@ -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
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user