You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to use parallel-ssh in a project of mine and all it's working fine, only I noticed that if I launch the command lsblk in the remote side an exception is raised
NB - the ascii decode was added for forwards compatibility with py3 which uses byte buffers by default and need decoding into strings.
Changing the decode to utf8 seems to resolve the issue though obviously exotic terminal encodings may still cause issues.
Perhaps the client should check character encoding via $LANG and convert accordingly.. Some testing if you have non utf8 or ascii terminals lying around would be appreciated.
In [1]: from pssh import ParallelSSHClient
In [2]: client = ParallelSSHClient(['localhost'])
In [3]: output = client.run_command('lsblk')
In [4]: for line in output['localhost']['stdout']: print line
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 238.5G 0 disk
├─sda1 8:1 0 62.7G 0 part
├─sda2 8:2 0 1.9G 0 part
└─sda3 8:3 0 173.9G 0 part /
sr0 11:0 1 1024M 0 rom
I'm trying to use
parallel-ssh
in a project of mine and all it's working fine, only I noticed that if I launch the commandlsblk
in the remote side an exception is raisedIf I log in the machine with
ssh
all it's working fine, the character that is causing trouble is thefirst in the third line of the output
i.e.
└
, If I removedecode('ascii')
from thessh_client
code all it's working fine.I'm not proposing a patch because I'm not sure what the
decode
function should do in this case, my guess is that is for terminal compatibility.Seems strange to me that I'm the first to encounter such issue, but I searched on github without any luck, so here we are.
The text was updated successfully, but these errors were encountered: