From da79b7d10712ce8559ebc421e031588566e55962 Mon Sep 17 00:00:00 2001 From: Marcus Lindblom Date: Sun, 3 Jan 2010 18:19:11 +0100 Subject: [PATCH] Minor console fixes (index error in code with sort-by-time + show category names in html properly) --- buildbot/status/web/console.py | 6 ++++-- buildbot/status/web/templates/console.html | 3 +-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/buildbot/status/web/console.py b/buildbot/status/web/console.py index 2a928e26b6b..5e88e4e5143 100755 --- a/buildbot/status/web/console.py +++ b/buildbot/status/web/console.py @@ -301,8 +301,10 @@ def getBuildsForRevision(self, request, builder, builderName, lastRevision, builds.append(devBuild) # Now break if we have enough builds. - if self.comparator.isRevisionEarlier( - devBuild, builder.getBuild(-1).getChanges()[-1]): + c = builder.getBuild(-1).getChanges() + #XXX: c is sometimes an empty tuple, so c[-1] fails?!?! + if c and self.comparator.isRevisionEarlier( + devBuild, c[-1]): break build = build.getPreviousBuild() diff --git a/buildbot/status/web/templates/console.html b/buildbot/status/web/templates/console.html index e3d58ff48fa..248b434cebf 100644 --- a/buildbot/status/web/templates/console.html +++ b/buildbot/status/web/templates/console.html @@ -82,9 +82,8 @@

Console View

- {{ project_name }} {% if categories|length > 1 %} -
Categories: {{ categories }} +
Categories: {% for c in categories %}{{ c.name }} {% endfor %} {% endif %} {% if branch != ANYBRANCH %}
Branch: {{ branch }}