[Buildbot-devel] Adding a new attribute to LogFile

Dustin J. Mitchell dustin at v.igoro.us
Mon Dec 13 16:20:21 UTC 2010


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/474601c1/attachment.html>


More information about the devel mailing list