Make the cipher spec optional

This commit is contained in:
Jérémie Courrèges-Anglas 2015-05-13 15:48:37 +02:00
parent 07bb5d7de6
commit 53b0d44ead

View File

@ -139,7 +139,9 @@ class backup_rsync(backup_generic):
backup_source = '%s@%s::%s%s' % (self.remote_user, self.server_name, self.rsync_module, self.remote_dir) backup_source = '%s@%s::%s%s' % (self.remote_user, self.server_name, self.rsync_module, self.remote_dir)
else: else:
# case of rsync + ssh # case of rsync + ssh
ssh_params = ['-o StrictHostKeyChecking=no','-c %s' % self.cipher_spec] ssh_params = ['-o StrictHostKeyChecking=no']
if self.cipher_spec:
ssh_params.append('-c %s' % self.cipher_spec)
if self.private_key: if self.private_key:
ssh_params.append('-i %s' % self.private_key) ssh_params.append('-i %s' % self.private_key)
if self.ssh_port <> 22: if self.ssh_port <> 22: