If your starter dies, its exit code is parsed out of the os.waitpid() call in util.py:system, then passed back via util.py:execute, cmd.py:start and cmd.py:dumbo.
If you're running dumbo from the entry script generated by easy_install, all is fine, as it captures the return value of the entry point (cmd.py:dumbo) and passes this to sys.exit().
But if you're using the wrapper generated by buildout, this return code is ignored, because of this issue:
... meaning that your dumbo task as a whole still exits with 0, despite the exception in your starter.
I know this isn't really a bug in dumbo, but since dumbo is distributed via buildout, I thought it worth reporting. One workaround would be to add a line like this to cmd.py:dumbo:
if retval != 0:
raise RuntimeError('%s command died with code %d') % (sys.argv, retval)
Arguably this is a more pythonic way to communicate an error condition than passing integers around anyway.
PS Thanks for fixing those last ones so quickly, Klaas :-)
use new 'execute_and_exit()' function as entry point for 'dumbo' console script to avoid buildout bug (closed by 76c7c9b)
use new 'execute_and_exit()' function as entry point for 'dumbo' cons…
…ole script to avoid buildout bug (fixes GH-31)