Skip to content

Commit 38b37f2

Browse files
author
Dan
committed
Change decoding to utf8 to account for utf terminal encoding. Resolves #54. Added call on partial host failure tests to catch partial host list failure errors - #52. Merged changes from #53. Resolves #52 - resolves #53.
1 parent c9ede18 commit 38b37f2

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

pssh/ssh_client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ def exec_command(self, command, sudo=False, user=None, **kwargs):
237237
def _read_output_buffer(self, output_buffer, prefix=''):
238238
"""Read from output buffers and log to host_logger"""
239239
for line in output_buffer:
240-
output = line.strip().decode('ascii')
240+
output = line.strip().decode('utf8')
241241
host_logger.info("[%s]%s\t%s", self.host, prefix, output,)
242242
yield output
243243

tests/test_pssh_client.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,7 @@ def test_pssh_client_hosts_list_part_failure(self):
200200
agent=self.agent)
201201
output = client.run_command(self.fake_cmd,
202202
stop_on_errors=False)
203+
client.join(output)
203204
self.assertTrue(hosts[0] in output,
204205
msg="Successful host does not exist in output - output is %s" % (output,))
205206
self.assertTrue(hosts[1] in output,

0 commit comments

Comments
 (0)