[jhbuild] [buildbot] fix generation of feed when last log is missing
- From: Frederic Peters <fpeters src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [jhbuild] [buildbot] fix generation of feed when last log is missing
- Date: Mon, 10 Jan 2011 10:21:01 +0000 (UTC)
commit 47656aaa7bbc3387311d4844b776bdae2492a81d
Author: Frédéric Péters <fpeters 0d be>
Date: Mon Jan 10 11:20:13 2011 +0100
[buildbot] fix generation of feed when last log is missing
jhbuild/buildbot/status/web/feeds.py | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/jhbuild/buildbot/status/web/feeds.py b/jhbuild/buildbot/status/web/feeds.py
index 55dd319..4718ba0 100644
--- a/jhbuild/buildbot/status/web/feeds.py
+++ b/jhbuild/buildbot/status/web/feeds.py
@@ -155,6 +155,7 @@ class FeedResource(XmlResource):
# get name of the failed step and the last 30 lines of its log.
lastlog = ''
+ laststep = None
if build.getLogs():
log = build.getLogs()[-1]
laststep = log.getStep().getName()
@@ -174,7 +175,8 @@ class FeedResource(XmlResource):
description += '<dt>Build details</dt><dd><a href="%s">%s</a></dd>' % (link, link)
if build.getResponsibleUsers():
description += '<dt>Author list</dt><dd>' + ', '.join(build.getResponsibleUsers()) + '</dd>\n'
- description += '<dt>Failed step</dt><dd><b>%s</b></dd>\n' % laststep
+ if laststep:
+ description += '<dt>Failed step</dt><dd><b>%s</b></dd>\n' % laststep
description += '</dl>\n'
description += '<p>Last lines of the build log:</p>\n'
description += '<pre>%s</pre>' % twhtml.escape(lastlog)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]