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()