llvmbot monitor: Handle having only 1 build, that is a failure

The SVE bots haven't been on staging in a very long time
so the only build result there is the 1 most recent.

Don't try to get the commit range etc. if that's the case.

Change-Id: I87271c7d6db9c6d303dc67e1ef5b9fadcdd67eaf
diff --git a/monitor/bot-status.py b/monitor/bot-status.py
index e0128d6..348bb3d 100755
--- a/monitor/bot-status.py
+++ b/monitor/bot-status.py
@@ -123,12 +123,15 @@
 
       if status['fail']:
         buildid = build['buildid']
-        prev_buildid = next(reversed_builds, None)['buildid']
-        status['changes'] = get_bot_failure_changes(session, base_url,
-                                                    buildid,
-                                                    prev_buildid)
         status['steps'] = list(get_bot_failing_steps(session, base_url,
                                                      buildid))
+        prev_build = next(reversed_builds, None)
+        # It is possible that there is exactly 1 build and it was a failure.
+        if prev_build is not None:
+          prev_buildid = prev_build['buildid']
+          status['changes'] = get_bot_failure_changes(session, base_url,
+                                                      buildid,
+                                                      prev_buildid)
 
       return status