Update transmit.py check for gui and sleep 30 more

master-bh
Alan Johnston 2 months ago committed by GitHub
parent dacf276cfc
commit 3ff6802fd7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

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

Loading…
Cancel
Save

Powered by TurnKey Linux.