def check_call_capturing(arguments, input = None, preexec_fn = None):

    (stdout, stderr, code) = call_capturing(arguments, input, preexec_fn)

    if code == 0:
        return (stdout, stderr)
    else:
        from subprocess import CalledProcessError

        error = CalledProcessError(code, arguments)

        error.stdout = stdout
        error.stderr = stderr

        raise error
Spawn a process and return its output.
dataset/ETHPy150Open borg-project/borg/borg/util.py/check_call_capturing