[Scons-users] weird bug that responds to presence/absence of print statement

Dirk Bächle tshortik at gmx.de
Fri Oct 11 05:26:30 EDT 2013


On 11.10.2013 10:02, Henry Gomersall wrote:

> I've rather a strange problem that I'm trying to understand in

> debugging my tool

> (https://gist.github.com/hgomersall/6915968#file-jinja-py) further to

> discussions yesterday.

>

> The problem I'm encountering is the simple presence of a print

> statement in the Builder action function allows the tool to work,

> removing it breaks it. (Essentially, I add `str(template_file)` at

> line 23, where template_file is an element in the source arg).

>

> Is there some nefarious effect going on with SCons using the stdout

> from the builder action to do something?

>


I don't think so. When such strange behaviour is seen, I look for
try/except blocks that are always good for a surprise.
You have one in the same function, so maybe some exception is raised but
not catched?

This wouldn't explain why the "print" makes things work suddenly, but it
might be good to remove the try/except clause (not the code within!) and
check whether any exceptions are lurking around at all. Maybe this gives
you a further clue...

Regards,

Dirk



More information about the Scons-users mailing list