Convert gerrit output to utf8 unicode
We get back bytestrings from paramiko when it talks to gerrit. Make this a bit more user friendly for python3 and decode these bytestrings into utf8 unicode. Change-Id: I1866de53d0978f805faef0933ef37e68454ff5f3
This commit is contained in:
parent
c234e11b51
commit
945d2088a7
@ -408,13 +408,13 @@ class Gerrit(object):
|
||||
self.log.debug("SSH command:\n%s" % command)
|
||||
stdin, stdout, stderr = client.exec_command(command)
|
||||
|
||||
out = stdout.read()
|
||||
out = stdout.read().decode('utf8')
|
||||
self.log.debug("SSH received stdout:\n%s" % out)
|
||||
|
||||
ret = stdout.channel.recv_exit_status()
|
||||
self.log.debug("SSH exit status: %s" % ret)
|
||||
|
||||
err = stderr.read()
|
||||
err = stderr.read().decode('utf8')
|
||||
self.log.debug("SSH received stderr:\n%s" % err)
|
||||
finally:
|
||||
if client:
|
||||
|
Loading…
Reference in New Issue
Block a user