Fail with encoding problems as early as possible.

We decode stdout from utf-8 to detect potential unicode problems
as early as possible.

Change-Id: If8fe35801d398eb5dbbd04f5f92317228df10ee9
Partly-bug: 1573638
This commit is contained in:
Krzysztof Szukiełojć 2016-04-26 13:42:28 +02:00
parent 230d84cacf
commit 6d53c7c423
1 changed files with 1 additions and 0 deletions

View File

@ -129,6 +129,7 @@ class Driver(object):
logger.debug("Running local command: %s", command)
out.return_code, out.stdout, out.stderr = utils.execute(
command)
out.stdout = out.stdout.decode('utf-8')
out.output = out.stdout
except fabric.exceptions.NetworkError as e:
logger.error("NetworkError occured: %s", str(e))