From 3ff6802fd70f7f6de31898fe9f5f6b8b6c948b18 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 21 Jul 2026 21:16:54 -0400 Subject: [PATCH] Update transmit.py check for gui and sleep 30 more --- transmit.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/transmit.py b/transmit.py index 6a469d0e..ad1c4cd5 100644 --- a/transmit.py +++ b/transmit.py @@ -1093,6 +1093,22 @@ if __name__ == "__main__": if (mode == 'm') and (skip == False): print("Sleeping 15 seconds") sleep(15) # avoid CW jumping around at start + + query = ["systemctl", "get-default", "|", "grep graphical.target"] + try: + result = subprocess.run(query, capture_output=True, text=True, check=True) + print(f"Command run was: {query}") + gui_status = result.stdout.strip() + print(f"Output of the command (stdout): {gui_status}") + except subprocess.CalledProcessError as e: + # print(f"Command failed with return code: {e.returncode}") + print(f"Command run was: {e.cmd}") + gui_status = e.stdout.strip() + print(f"Output of the command (stdout): {e.stdout}") + # print(f"Error output of the command (stderr): {e.stderr}") + if gui_status = "graphical.target": + sleep(30) # sleep another 30 seconds for cpu to settle down + print (gui_status) sim_failure_check()