[Buildbot-devel] Adding a new attribute to LogFile

Derek Graham (ML) derek.m.graham+ml at gmail.com
Mon Dec 13 18:52:35 UTC 2010


hasattr worked (I wrapped that check in LogFile and HTMLogFile), thanks
Dustin.

No more hundred log files showing up in waterfall but there are still stored
for traceability. :)

On 13 December 2010 16:20, Dustin J. Mitchell <dustin at v.igoro.us> wrote:

> On Mon, Dec 13, 2010 at 6:01 AM, Derek Graham (ML) <
> derek.m.graham+ml at gmail.com <derek.m.graham%2Bml at gmail.com>> wrote:
>
>> <type 'exceptions.AttributeError'>: LogFile instance has no attribute
>> 'hidden'
>> What I have missed?
>>
>
> I'm guessing that you're seeing the status of pickled builds from before
> your change.  You'll need to support this, but it's tricky.
>
> Twisted provides a styles.Versioned class that makes this a bit easier, but
> unfortunately that only works when the pickled version of the instance had
> that parent class.
>
> In your case, everywhere you consult .hidden, you'll need to replace with
> hasattr(self, 'hidden') and self.hidden, so that old instances do not cause
> this exception.
>
> Dustin
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://buildbot.net/pipermail/devel/attachments/20101213/3fd6731e/attachment.html>


More information about the devel mailing list