This commit is contained in:
2026-02-25 12:19:29 +00:00
parent 5ee126d0ec
commit 2ca97cba47

View File

@@ -43,7 +43,7 @@ def update():
if data is not None and data["noshutdown"] == 1: if data is not None and data["noshutdown"] == 1:
if (LAST_VALUE != 0): if (LAST_VALUE != 0):
subprocess.run(["shutdown", "/a"]) subprocess.run(["shutdown", "/a"])
exit return
if data is None: if data is None:
time = to_seconds(datetime.strptime(DEFAULT_SHUTDOWN, "%H:%M").time()) time = to_seconds(datetime.strptime(DEFAULT_SHUTDOWN, "%H:%M").time())
else: else:
@@ -51,7 +51,7 @@ def update():
now = to_seconds(datetime.now().time()) now = to_seconds(datetime.now().time())
if (time - now) < 0: if (time - now) < 0:
exit return
if (time == LAST_VALUE): if (time == LAST_VALUE):
print("Nothing changed") print("Nothing changed")