Skip to content
Snippets Groups Projects
Commit c7b17b2a433a authored by Manuel Jacob's avatar Manuel Jacob
Browse files

py3: convert from unicode to bytes

parent 320ffeb5f386
No related branches found
No related tags found
1 merge request!21Make tests pass on Python 3
from __future__ import absolute_import, print_function
from dulwich.client import SubprocessWrapper
from dulwich.client import SSHGitClient, SubprocessWrapper
import subprocess
from . import compat
......@@ -17,7 +17,8 @@
class _Vendor(SSHVendor):
def run_command(self, host, command, username=None, port=None):
assert isinstance(command, basestring)
assert isinstance(command, compat.unicode)
command = command.encode(SSHGitClient.DEFAULT_ENCODING)
sshcmd = ui.config(b"ui", b"ssh", b"ssh")
args = compat.sshargs(sshcmd, host, username, port)
cmd = b'%s %s %s' % (sshcmd, args, compat.shellquote(command))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment