Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions openssh_wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ def run(self, command, interpreter='/bin/bash', forward_ssh_agent=False):
if returncode == 255: # ssh client error
raise SSHError("%s (under %s): %s" % (
' '.join(ssh_command), self.user, err.strip()))
return SSHResult(command, out.strip(), err.strip(), returncode)
return SSHResult(command.encode('utf-8', 'ignore'), out.strip(), err.strip(), returncode)

def scp(self, files, target, mode=None, owner=None):
""" Copy files identified by their names to remote location
Expand Down Expand Up @@ -455,7 +455,7 @@ def repr_binary(self):
return b('').join(ret)

def repr_text(self):
return self.repr_binary().encode('utf-8', 'ignore')
return self.repr_binary().decode('utf-8', 'ignore')


class SSHError(Exception):
Expand Down