From 28a0e5dc56103186550e5c905838127011552e37 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 16 Feb 2026 09:15:04 -0500 Subject: [PATCH] Update transmit.py add os_status print --- transmit.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/transmit.py b/transmit.py index f319397b..f4454929 100644 --- a/transmit.py +++ b/transmit.py @@ -461,6 +461,22 @@ if __name__ == "__main__": # card = "Headphones" # default using pcm audio output of Pi Zero card = "Device" # using USB sound card for audio output + query = ["grep", "bookworm", "/etc/os-release"] + try: + result = subprocess.run(query, capture_output=True, text=True, check=True) + print(f"Command run was: {query}") + os_status = result.stdout.strip() + print(f"Output of the command (stdout): {os_status}") + except subprocess.CalledProcessError as e: +# print(f"Command failed with return code: {e.returncode}") + print(f"Command run was: {e.cmd}") + os_status = e.stdout.strip() + print(f"Output of the command (stdout): {e.stdout}") +# print(f"Error output of the command (stderr): {e.stderr}") + if os_status != "bookworm": + os_status = "bullseye" + print (os_status) + query = ["sudo", "systemctl", "is-active", "gpsd.socket"] try: result = subprocess.run(query, capture_output=True, text=True, check=True)