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. Change-Id: I780629059d7375df727cab28dfa219a7c9c20af7
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user