mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-24 11:21:25 -07:00
More fixes for unicode handling in the connection plugins.
Tested that ssh, docker, local, lxc-libvirt, chroot all work with the updated unicode integration test.
This commit is contained in:
parent
669b311dbe
commit
46903c80fa
7 changed files with 62 additions and 29 deletions
|
@ -113,7 +113,7 @@ class Connection(ConnectionBase):
|
|||
""" Connect to the container. Nothing to do """
|
||||
super(Connection, self)._connect()
|
||||
if not self._connected:
|
||||
display.vvv("ESTABLISH DOCKER CONNECTION FOR USER: {0}".format(
|
||||
display.vvv(u"ESTABLISH DOCKER CONNECTION FOR USER: {0}".format(
|
||||
self._play_context.remote_user, host=self._play_context.remote_addr)
|
||||
)
|
||||
self._connected = True
|
||||
|
@ -172,7 +172,7 @@ class Connection(ConnectionBase):
|
|||
# running containers, so we use docker exec to implement this
|
||||
executable = C.DEFAULT_EXECUTABLE.split()[0] if C.DEFAULT_EXECUTABLE else '/bin/sh'
|
||||
args = [self.docker_cmd, "exec", "-i", self._play_context.remote_addr, executable, "-c",
|
||||
"dd of={0} bs={1}".format(out_path, BUFSIZE)]
|
||||
"dd of=%s bs=%s" % (out_path, BUFSIZE)]
|
||||
args = map(to_bytes, args)
|
||||
with open(in_path, 'rb') as in_file:
|
||||
try:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue