Skip to content

Commit

Permalink
📝 Address lint
Browse files Browse the repository at this point in the history
  • Loading branch information
akrherz committed Dec 2, 2024
1 parent 7e69909 commit 10b9ece
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions util/onewire_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ def work():
stderr=subprocess.PIPE,
) as proc:
stdout, stderr = proc.communicate()
if stderr != b"":
print("Rut roh")
print(stderr.decode("ascii"))
return
d = stdout.decode("ascii").split("\n")
with open("onewire.txt", "w") as fh:
fh.write("\n".join(d))
Expand All @@ -35,8 +39,8 @@ def work():
fp = f"ot0003_{now:%Y%m%d%H%M}.dat"
with open(fp, "w") as fh:
fh.write(
"104,%s,%s, %s, %s, %s,11.34\n"
% (now.strftime("%Y,%j,%H%M"), data[0], data[1], data[2], data[3])
f"104,{now:%Y},{now:%j},{now:%%H%M},{data[0]}, "
f"{data[1]}, {data[2]}, {data[3]},11.34\n"
)
subprocess.call(["/home/meteor_ldm/bin/pqinsert", fp])
os.remove(fp)
Expand Down

0 comments on commit 10b9ece

Please sign in to comment.