diff --git a/management/backup.py b/management/backup.py index 3c4c38d7..99c3d60e 100755 --- a/management/backup.py +++ b/management/backup.py @@ -221,7 +221,9 @@ def get_duplicity_additional_args(env): port = urlsplit(config["target"]).port except ValueError: port = 22 - + if port is None: + port = 22 + return [ f"--ssh-options= -i /root/.ssh/id_rsa_miab -p {port}", f"--rsync-options= -e \"/usr/bin/ssh -oStrictHostKeyChecking=no -oBatchMode=yes -p {port} -i /root/.ssh/id_rsa_miab\"", @@ -424,6 +426,8 @@ def list_target_files(config): port = target.port except ValueError: port = 22 + if port is None: + port = 22 target_path = target.path if not target_path.endswith('/'):