Buildout doesn't honor exit code from scripts

Bug #697913 reported by Abhishek Mukherjee on 2011-01-05
This bug affects 4 people
Affects Status Importance Assigned to Milestone

Bug Description

if you return exit codes from your main script, Distribute at least will call sys.exit() on the return value. Buildout's resulting script, on the other hand, does not. For example, assume you have the foo/

def main():
    return 3

and the


On the resulting script from running install, you'd get a line similar to
if __name__ == '__main__':

(it actually does some fancy load_entry_points logic that i'm skipping for conciseness). Buildout gives the equivalent line:
if __name__ == '__main__':

Thus ignoring the return code to the main function

Guy Rozendorn (guy-rozendorn) wrote :

this patch does sys(exit) on the result

fixed on trunk, thanks!

Changed in zc.buildout:
status: New → Fix Committed
Remco Wendt (shanx) wrote :

Any idea when a new release will be done that includes this patch?

kleist (kleist) wrote :

Shouldn't this ticket be closed, since the bug was fixed by 2.0.0 ( ?

Jim Fulton (jim-zope) wrote :


Changed in zc.buildout:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers