Skip to content

Commit 52ce182

Browse files
committed
Fix output of compilation error
1 parent 669e688 commit 52ce182

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/msgcheck/po.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -479,9 +479,9 @@ def compile(self) -> tuple[str, int]:
479479
output = subprocess.check_output( # noqa: S603
480480
["msgfmt", "-c", "-o", "/dev/null", self.filename], # noqa: S607
481481
stderr=subprocess.STDOUT,
482-
).decode("utf-8")
482+
).decode("utf-8", errors="replace")
483483
except subprocess.CalledProcessError as exc:
484-
return (exc.output, exc.returncode)
484+
return (exc.output.decode("utf-8", errors="replace"), exc.returncode)
485485
return (output, 0)
486486

487487

0 commit comments

Comments
 (0)