AutoYADM commit: 2025-06-10 00:09:05

This commit is contained in:
Daniel Fichtinger 2025-06-10 00:09:05 -04:00
parent 66ed93369c
commit e011abfe4e
2 changed files with 25 additions and 9 deletions

View file

@ -57,7 +57,7 @@ def test():
def cleanup(inp: str, outp: str, dir: str):
subprocess.run(["notify-send", "cleanup runs"])
# subprocess.run(["notify-send", "cleanup runs"])
try:
os.remove(inp)
os.remove(outp)
@ -97,7 +97,7 @@ def daemonize(inp: str, outp: str, dir: str):
def main():
subprocess.run(["notify-send", "begin loop"])
# subprocess.run(["notify-send", "begin loop"])
# create unique directory and names
fifo_dir = tempfile.mkdtemp(prefix="diagpipe-")
in_path = os.path.join(fifo_dir, "in")
@ -119,8 +119,9 @@ def main():
if not line:
continue
assert isinstance(line, str)
subprocess.run(["notify-send", f"Received command: {line}"])
# # subprocess.run(["notify-send", f"Received command: {line}"])
if line.startswith("set "):
# subprocess.run(["notify-send", f"Received set: {line}"])
_, payload = line.split(" ", 1)
diagnostics = parse_specs(payload)
_ = outfile.write("ok\n")
@ -132,7 +133,7 @@ def main():
_ = outfile.write("true\n" if result else "false\n")
outfile.flush()
elif line.startswith("exit"):
subprocess.run(["notify-send", "exit received"])
# subprocess.run(["notify-send", "exit received"])
sys.exit(0)