Ticket #1059 (closed defect: fixed)

Opened 3 years ago

Last modified 3 years ago

Console view crashes when category starts with a number (or has a dot?)

Reported by: pitrou Owned by:
Priority: major Milestone: undecided
Version: 0.8.2 Keywords: web
Cc: pitrou

Description

You can see it when clicking on the "console" link at top here:  http://www.python.org/dev/buildbot/all/waterfall The console view crashes because it doesn't find a category named ".7.stable". Actually, a category "2.7.stable" exists. It seems the console view tries to strip the leading number of category names (or perhaps this is because of the dot?).

On the debug page which is generated:  http://www.python.org/dev/buildbot/all/console we see that indeed the items in the "categories" list are wrong:

List instance @ 0x954d10c
Dictionary instance @ 0xb2d1446cL
'name'	'.7.stable'
'size'	11
Dictionary instance @ 0xb372146cL
'name'	'.7.unstable'
'size'	20
[etc.]

(this should have been "2.7.stable", "2.7.unstable"...) ... while the keys in the "slaves" dictionary are right.

Change History

comment:1 Changed 3 years ago by pitrou

And of course the fix is trivial:

--- console-orig.py	2010-11-15 20:46:48.000000000 +0100
+++ console.py	2010-11-15 20:50:02.000000000 +0100
@@ -353,7 +353,8 @@
             # way.  If the master owner wants to display the categories in a
             # given order, he/she can prepend a number to it. This number won't
             # be shown.
-            c["name"] = category.lstrip('0123456789')
+            #c["name"] = category.lstrip('0123456789')
+            c["name"] = category
 
             # To be able to align the table correctly, we need to know
             # what percentage of space this category will be taking. This is

comment:2 Changed 3 years ago by Dustin J. Mitchell

  • Status changed from new to closed
  • Resolution set to fixed

remove stripping of leading digits from category in console

Fixes #1059

Changeset: 226e56d21b42f677cc54c70db751d1b4dd2b6167

Note: See TracTickets for help on using tickets.