def success(exitcode, message):
    """
    Raise an IO Error if the return code from a subprocess is non-zero

    :param exitcode: The return code from a subprocess run
    :param message: A custom message if the process failed
    :raises: ChildProcessError
    """
    if exitcode is not 0:
        raise ChildProcessError('Command returned non-zero exit status: %s' %
            message)
