Avoid crash if connection to osTicket fails

This commit is contained in:
2Shirt 2019-03-13 22:26:42 -06:00
parent b6ecf348d4
commit 4c3fe1d66f
Signed by: 2Shirt
GPG key ID: 152FAC923B0E132C
2 changed files with 6 additions and 2 deletions

View file

@ -1002,7 +1002,11 @@ def run_hw_tests(state):
# Get ticket ID and name # Get ticket ID and name
if not state.ost.disabled: if not state.ost.disabled:
try:
state.ticket_id, state.ticket_name = state.ost.get_ticket_details() state.ticket_id, state.ticket_name = state.ost.get_ticket_details()
except TypeError:
# Happens if connection fails and retry is not attempted
pass
# Run disk safety checks (if necessary) # Run disk safety checks (if necessary)
_disk_tests_enabled = False _disk_tests_enabled = False

View file

@ -50,7 +50,7 @@ if __name__ == '__main__':
global_vars=global_vars) global_vars=global_vars)
# Done # Done
sleep(10) sleep(1)
pause('Press Enter to exit...') pause('Press Enter to exit...')
exit_script(1) exit_script(1)