mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 01:18:58 +00:00
Merge pull request #38877 from The-Loeki/ssh-ipv6
Salt-SSH client: Don't overwrite self.host w/IPv6 brackets
This commit is contained in:
commit
28018fd406
@ -333,10 +333,11 @@ class Shell(object):
|
||||
self.exec_cmd('mkdir -p {0}'.format(os.path.dirname(remote)))
|
||||
|
||||
# scp needs [<ipv6}
|
||||
if ':' in self.host:
|
||||
self.host = '[{0}]'.format(self.host)
|
||||
host = self.host
|
||||
if ':' in host:
|
||||
host = '[{0}]'.format(host)
|
||||
|
||||
cmd = '{0} {1}:{2}'.format(local, self.host, remote)
|
||||
cmd = '{0} {1}:{2}'.format(local, host, remote)
|
||||
cmd = self._cmd_str(cmd, ssh='scp')
|
||||
|
||||
logmsg = 'Executing command: {0}'.format(cmd)
|
||||
|
Loading…
Reference in New Issue
Block a user