Skip to content
Fetching contributors…
Cannot retrieve contributors at this time
42 lines (32 sloc) 1.36 KB

title: Proper exit code for buildout generated scripts

date: 2010-09-24 16:30:00+01:00




I recently ran into the issue that our Hudson installation didn't report test failures. After digging for a bit, I discovered, that scripts installed by zc.recipe.egg don't return the exit code for some cases. There is a bugreport at In our case the generated coverage script depended on this and because the sys.exit was missing, the test failures were masked.

The following is a way to fix this in your buildouts now until it's fixed in zc.buildout:

.. code-block:: ini

extensions = buildout.extensionscripts
extension-scripts =

The patchScriptGeneration function in src/ looks like this:

.. code-block:: python

def patchScriptGeneration(buildout):
    from zc.buildout import easy_install
    if not 'sys.exit(' in easy_install.script_template:
        easy_install.script_template = easy_install.script_template.replace(

.. _

You can’t perform that action at this time.