From 46fc8314b5956313f4f7a3f3cbaf970f6f8616f5 Mon Sep 17 00:00:00 2001 From: William Deegan Date: Mon, 17 Feb 2020 16:57:44 -0800 Subject: more unicode cleanup --- src/engine/SCons/Action.py | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/src/engine/SCons/Action.py b/src/engine/SCons/Action.py index c6fc575..b22de60 100644 --- a/src/engine/SCons/Action.py +++ b/src/engine/SCons/Action.py @@ -628,17 +628,9 @@ class _ActionAction(ActionBase): """ In python 3, and in some of our tests, sys.stdout is a String io object, and it takes unicode strings only - In other cases it's a regular Python 2.x file object - which takes strings (bytes), and if you pass those a - unicode object they try to decode with 'ascii' codec - which fails if the cmd line has any hi-bit-set chars. - This code assumes s is a regular string, but should - work if it's unicode too. + This code assumes s is a regular string. """ - try: - sys.stdout.write(s + u"\n") - except UnicodeDecodeError: - sys.stdout.write(s + "\n") + sys.stdout.write(s + "\n") def __call__(self, target, source, env, exitstatfunc=_null, -- cgit v0.12