fix trailing whitespace in CalledProcessError output

This commit is contained in:
Anthony Sottile 2023-02-21 12:42:09 -05:00
parent 192be6079b
commit 4ded56efac
3 changed files with 3 additions and 5 deletions

View file

@ -62,7 +62,7 @@ class CalledProcessError(RuntimeError):
def __bytes__(self) -> bytes:
def _indent_or_none(part: bytes | None) -> bytes:
if part:
return b'\n ' + part.replace(b'\n', b'\n ')
return b'\n ' + part.replace(b'\n', b'\n ').rstrip()
else:
return b' (none)'