Explicitly decode to utf-8
CI is currently failing on UnicodeDecodeErrors during the undercloud
install. I can't reproduce locally, but hopefully this will fix
the problem.
Closes-Bug: 1544150
Change-Id: I780629059d7375df727cab28dfa219a7c9c20af7
(cherry picked from commit 3fdd07eb64
)
This commit is contained in:
parent
35c018e6eb
commit
85eb5a6fd6
|
@ -342,7 +342,7 @@ def _run_command(args, env=None, name=None):
|
|||
try:
|
||||
return subprocess.check_output(args,
|
||||
stderr=subprocess.STDOUT,
|
||||
env=env).decode()
|
||||
env=env).decode('utf-8')
|
||||
except subprocess.CalledProcessError as e:
|
||||
LOG.error('%s failed: %s', name, e.output)
|
||||
raise
|
||||
|
@ -361,7 +361,7 @@ def _run_live_command(args, env=None, name=None):
|
|||
stdout=subprocess.PIPE,
|
||||
stderr=subprocess.STDOUT)
|
||||
while True:
|
||||
line = process.stdout.readline().decode()
|
||||
line = process.stdout.readline().decode('utf-8')
|
||||
if line:
|
||||
LOG.info(line.rstrip())
|
||||
if line == '' and process.poll() is not None:
|
||||
|
|
Loading…
Reference in New Issue