@contextmanager
def _when_exits_zero(call_if_ok):
    """
    Calls the function passed in if the SystemExit has a zero exit code.
    """
    try:
        yield
    except __HOLE__ as se:
        if getattr(se, 'code', None) == 0:
            # Update the tracking branch to reference current HEAD
            call_if_ok()
        raise
dataset/ETHPy150Open robmadole/jig/src/jig/commands/ci.py/_when_exits_zero