Python question
Jürgen Spitzmüller
jspitzm at gmail.com
Thu Dec 29 09:39:40 UTC 2022
makeupdatetests (runtests.py, for that matter) currently outputs rather
unpleasant messages, since it just prints stderr.read() in encoded
form.
The following change works for me, but is this the right thing to do?
diff --git a/src/tex2lyx/test/runtests.py
b/src/tex2lyx/test/runtests.py
index 103c74e307..4c5f969f34 100755
--- a/src/tex2lyx/test/runtests.py
+++ b/src/tex2lyx/test/runtests.py
@@ -109,7 +109,7 @@ def main(argv):
err = proc.returncode
errorstring = proc.stderr.read()
if not errorstring is None:
- print(errorstring)
+ print(errorstring.decode(sys.getfilesystemencoding()))
if err != 0:
errors.append(f)
Thanks,
--
Jürgen
More information about the lyx-devel
mailing list