mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Don't overwrite self.host w/IPv6 brackets
This commit is contained in:
parent
dd1223468b
commit
4fc5626f16
1 changed files with 4 additions and 3 deletions
|
@ -322,10 +322,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…
Add table
Reference in a new issue