Buildout wrapper script swallows exceptions raised by starter #31

andrewclegg opened this Issue Mar 14, 2011 · 1 comment

2 participants


If your starter dies, its exit code is parsed out of the os.waitpid() call in, then passed back via, and

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 ( 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

if retval != 0:
    raise RuntimeError('%s command died with code %d') % (sys.argv[1], 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)

@dangra dangra pushed a commit to dangra/dumbo that referenced this issue Apr 21, 2011
Klaas Bosteels use new 'execute_and_exit()' function as entry point for 'dumbo' cons…
…ole script to avoid buildout bug (fixes GH-31)
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment