[Buildbot-devel] How does isFileImportant work?, was Re: Some Questions

Dennis Schridde devurandom at gmx.net
Fri Jun 20 16:54:51 UTC 2008


Am Freitag, 20. Juni 2008 18:35:30 schrieb Dennis Schridde:
> Am Freitag, 20. Juni 2008 16:50:05 schrieb Dennis Schridde:
> > Am Freitag, 20. Juni 2008 12:10:15 schrieb Axel Hecht:
> > > AFAICT, fileIsImportant is called with two arguments, the scheduler
> > > and the change. I'm not dead-on sure that the scheduler is passed, but
> > > I think so.
> > >
> > > so you'd do something like
> > >
> > > def importQuickFiles(sched, change):
> > >   for f in change.getFiles():
> > >     if ....:
> > >       return True
> > >   return False
> >
> > Thanks, trying that now. Will tell you whether it worked as expected.
>
> Seems it does not work. And this is also the cause for "[Buildbot-devel]
> AttributeError exception: Normal?, was Re: Some questions".
>
> I now get this exception instead:
> <class 'twisted.spread.jelly.InsecureJelly'>: Type not allowed for object:
> <type 'type'> <type 'exceptions.TypeError'>
>
> Is there a way to introspect whatever arguments I get? Or some way to
> output debug info to twistd.log? It seems my "print type(change)" does not
> end up there.
Found a function that works:

def importantQuickFiles(change):
    for filename in change.files:
        if (filename.endswith(".c") or filen...):
            return True
    return False

There is no getFiles() function, you have to access the member variable 
directly instead.

Maybe this is a sample for the documentation, too?

--Dennis
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part.
URL: <http://buildbot.net/pipermail/devel/attachments/20080620/7db29618/attachment.bin>


More information about the devel mailing list