message: ci: wrap checks with try block to avoid panic
diff: import os
  import json
  import sys
  +import traceback
  from textwrap import dedent
  from time import sleep, time
  from pathlib import Path
  @@ -119,7 +120,7 @@ def main():
  try_download(build_id, dl_path)
  else:
  # Try up to three times
  - MAX_ATTEMPTS = 3
  + MAX_ATTEMPTS = 5
  success = False
  for i in range(MAX_ATTEMPTS):
  @@ -153,6 +154,7 @@ def main():
  for attempt in range(TRIES):
  print("Checking...")
  + try:
  status = check_build_status(key, build_id)
  if status.startswith("COMPLETE"):
  print("Build complete. Downloading artifact files.")
  @@ -170,9 +172,13 @@ def main():
  break
  elif attempt + 1 < TRIES:
  sleep(SLEEP_SEC)
  + except Exception as ex:
  + print("Unexpected error:")
  + print(ex)
  + print(traceback.format_exc())
  + sleep(60) # Sleep for a minute if something went wrong, just in case.
  else:
  print("Build failed to complete after {} minutes, bailing.".format(MINUTES))
  - continue
  if not success:
  exit(2)
  