Don't overwrite self.host w/IPv6 brackets

This commit is contained in:
Ronald van Zantvoort 2017-01-23 13:07:56 +01:00 committed by Ronald van Zantvoort
parent dd1223468b
commit 4fc5626f16

View file

@ -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)