a
This commit is contained in:
@@ -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")
|
||||||
|
|||||||
Reference in New Issue
Block a user