diff --git a/check_systemd_timer.py b/check_systemd_timer.py index 07d897c..1b4c5a6 100755 --- a/check_systemd_timer.py +++ b/check_systemd_timer.py @@ -20,7 +20,7 @@ SYSTEMCTL_TIMERS_RE = re.compile( r'^(([A-Za-z]*\s[0-9]{4}-[0-9]{2}-[0-9]{2}\s*[0-9]{2}:[0-9]{2}:[0-9]{2}\s[A-Z]*)|n\/a)\s*((([0-9]*[a-z]*\s)*left)|n\/a)\s*(([A-Za-z]*\s[0-9]{4}-[0-9]{2}-[0-9]{2}\s[0-9]{2}:[0-9]{2}:[0-9]{2}\s[A-Z]*)|n\/a)\s*(([0-9A-Za-z\s]*\sago)|n\/a)\s*([A-Za-z\-_]*.timer)\s*(([A-Za-z\-_]*.service)|\s*)') -def get_next_elapse(timer_name) -> tuple[None, Exception] | tuple[dict, None]: +def get_next_elapse(timer_name): try: output = subprocess.check_output(["systemctl", "list-timers", "--all"], universal_newlines=True) lines = output.split('\n')