[Scons-dev] What should I return from generator function?

Gary Oberbrunner garyo at oberbrunner.com
Thu Oct 4 15:02:25 EDT 2012


On Thu, Oct 4, 2012 at 2:27 PM, Left Right <olegsivokon at gmail.com> wrote:

> May come as a bizarre question to you, but I'm clueless :)

> Some observations:

> - if I don't return anything, or return None - I get error "Object

> returned from command generator: %s cannot be used to create an

> Action."

> - if I return an empty string - the generator function is executed

> multiple times (11, or so)

> - if I return anything that would be equivalent to False - same error

> as with returning None


The generator should return an Action or something that can be turned
into an Action.
See http://www.scons.org/doc/HTML/scons-user/x3755.html

The only things that can be turned into Actions are a string (which is
a command to be executed), or a python function (which gets run when
the action is executed), or lists thereof.

(see http://www.scons.org/doc/production/HTML/scons-api/index.html if
you really care.)

--
Gary


More information about the Scons-dev mailing list