[Buildbot] #2949: descriptionDone may not always be coerced into list of strings; thus causing exception
Buildbot trac
trac at buildbot.net
Fri Oct 17 17:32:08 UTC 2014
#2949: descriptionDone may not always be coerced into list of strings; thus
causing exception
-------------------+------------------------
Reporter: bms20 | Owner:
Type: defect | Status: new
Priority: major | Milestone: undecided
Version: 0.8.9 | Resolution:
Keywords: |
-------------------+------------------------
Changes (by sa2ajj):
* type: undecided => defect
Old description:
> I've run into a problem where a ShellCommand may create an exception.
>
> It appears that the basic idea behind the descriptionDone field (and I
> suspect the description field as well) are that they are strings or lists
> of strings denoting text to be reported on completion of a BuildStep.
>
> The problem arises when I create a ShellCommand and provide a string
> description field. In both MasterShellCommand and ShellCommand the input
> to the field descriptionDone is checked to verify whether it is an
> instance of a string or not.
>
> This test fails when one provides a unicode string - thus the resulting
> exception is raised on line 716 of buildbot/process/buildstep.py when the
> code attempts to add a list of string to a unicode item.
>
> Can I suggest that the test is inverted such that if the item is not of
> type list, then the item is embedded in a list prior to storage on
> self.descriptionDone?
>
> Additionally, can this process be moved to the base class constructor?
New description:
I've run into a problem where a !ShellCommand may create an exception.
It appears that the basic idea behind the descriptionDone field (and I
suspect the description field as well) are that they are strings or lists
of strings denoting text to be reported on completion of a !BuildStep.
The problem arises when I create a !ShellCommand and provide a string
description field. In both !MasterShellCommand and !ShellCommand the
input to the field descriptionDone is checked to verify whether it is an
instance of a string or not.
This test fails when one provides a unicode string - thus the resulting
exception is raised on line 716 of buildbot/process/buildstep.py when the
code attempts to add a list of string to a unicode item.
Can I suggest that the test is inverted such that if the item is not of
type list, then the item is embedded in a list prior to storage on
self.descriptionDone?
Additionally, can this process be moved to the base class constructor?
--
--
Ticket URL: <http://trac.buildbot.net/ticket/2949#comment:1>
Buildbot <http://buildbot.net/>
Buildbot: build/test automation
More information about the bugs
mailing list