X-Git-Url: https://git.madduck.net/etc/vim.git/blobdiff_plain/e6934fd8d9d749d8bab4e880d1e3f1f27537c2c1..4310f39bd94c7fa29fc31079247d2aab4bd50f1a:/src/black_primer/lib.py diff --git a/src/black_primer/lib.py b/src/black_primer/lib.py index 913f9d5..5c5576e 100644 --- a/src/black_primer/lib.py +++ b/src/black_primer/lib.py @@ -59,10 +59,12 @@ async def _gen_check_output( raise if process.returncode != 0: + returncode = process.returncode + if returncode is None: + returncode = 69 + cmd_str = " ".join(cmd) - raise CalledProcessError( - process.returncode, cmd_str, output=stdout, stderr=stderr - ) + raise CalledProcessError(returncode, cmd_str, output=stdout, stderr=stderr) return (stdout, stderr) @@ -131,6 +133,10 @@ async def black_run( else: results.stats["success"] += 1 return + elif cpe.returncode > 1: + results.stats["failed"] += 1 + results.failed_projects[repo_path.name] = cpe + return LOG.error(f"Unknown error with {repo_path}") raise