Skip to content

Commit 8b7bb4b

Browse files
Tysherpkittenis
authored andcommitted
Calling join() would reset expected encoding set on run_command() to utf-8 (#159)
Pass through encoding parameter when calling `join`.
1 parent cf2b65e commit 8b7bb4b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pssh/clients/native/parallel.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ def _run_command(self, host, command, sudo=False, user=None,
236236
logger.error("Failed to run on host %s - %s", host, ex)
237237
raise ex
238238

239-
def join(self, output, consume_output=False, timeout=None):
239+
def join(self, output, consume_output=False, timeout=None, encoding='utf-8'):
240240
"""Wait until all remote commands in output have finished
241241
and retrieve exit codes. Does *not* block other commands from
242242
running in parallel.
@@ -265,7 +265,7 @@ def join(self, output, consume_output=False, timeout=None):
265265
client = self.host_clients[host]
266266
channel = host_out.channel
267267
stdout, stderr = self.reset_output_generators(
268-
host_out, client=client, channel=channel, timeout=timeout)
268+
host_out, client=client, channel=channel, timeout=timeout, encoding=encoding)
269269
try:
270270
client.wait_finished(channel, timeout=timeout)
271271
except Timeout:

0 commit comments

Comments
 (0)