Unverified Commit 988c686d authored by James Addison's avatar James Addison Committed by GitHub
Browse files

Remove placeholder exit code in unreachable 'black-primer' subprocess handler (#1952)

parent 71117e73
Loading
Loading
Loading
Loading
+8 −5
Changes for src/black_primer/lib.py: 8 added lines, 5 removed lines.
Original line number Diff line number Diff line
@@ -58,13 +58,16 @@ async def _gen_check_output(
        await process.wait()
        raise

    if process.returncode != 0:
        returncode = process.returncode
        if returncode is None:
            returncode = 69
    # A non-optional timeout was supplied to asyncio.wait_for, guaranteeing
    # a timeout or completed process.  A terminated Python process will have a
    # non-empty returncode value.
    assert process.returncode is not None

    if process.returncode != 0:
        cmd_str = " ".join(cmd)
        raise CalledProcessError(returncode, cmd_str, output=stdout, stderr=stderr)
        raise CalledProcessError(
            process.returncode, cmd_str, output=stdout, stderr=stderr
        )

    return (stdout, stderr)