Bug 1964657 - also fix linter output handling for iso8859-1 encoding. r=ahal

Differential Revision: https://phabricator.services.mozilla.com/D248273
This commit is contained in:
Sebastian Hengst
2025-05-08 07:47:07 +00:00
committed by archaeopteryx@coole-files.de
parent bf3516e81e
commit 2dc897c5d7

View File

@@ -512,7 +512,7 @@ def run(
if out:
fh = open(path, "w") if path else sys.stdout
if not path and fh.encoding == "ascii":
if not path and fh.encoding in ("ascii", "iso8859-1"):
# If sys.stdout.encoding is ascii, printing output will fail
# due to the stylish formatter's use of unicode characters.
# Ideally the user should fix their environment by setting