Avoid crash if connection to osTicket fails
This commit is contained in:
parent
b6ecf348d4
commit
4c3fe1d66f
2 changed files with 6 additions and 2 deletions
|
|
@ -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
|
||||||
|
|
|
||||||
|
|
@ -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)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue