Buildout doesn't honor exit code from scripts
Bug #697913 reported by
Abhishek Mukherjee
This bug affects 4 people
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Buildout |
Fix Released
|
Undecided
|
Unassigned |
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/__init__.py:
def main():
return 3
and the setup.py
...
setup(...
entry_
[console_
foo=foo:main
''''
)
On the resulting script from running setup.py install, you'd get a line similar to
if __name__ == '__main__':
sys.
(it actually does some fancy load_entry_points logic that i'm skipping for conciseness). Buildout gives the equivalent line:
if __name__ == '__main__':
foo.main()
Thus ignoring the return code to the main function
Changed in zc.buildout: | |
status: | New → Fix Committed |
To post a comment you must log in.
this patch does sys(exit) on the result