From 1a413e3dbd803caa9d8e122f589428f8dd420262 Mon Sep 17 00:00:00 2001 From: mamullen13316 Date: Fri, 15 Mar 2024 09:37:55 -0400 Subject: [PATCH] Fix update_backup method (#60) --- pyproject.toml | 2 +- sophosfirewall_python/templates/updatebackup.j2 | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 19053fb..26503e8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -3,7 +3,7 @@ name = "sophosfirewall-python" packages = [ { include = "sophosfirewall_python" }, ] -version = "0.1.34" +version = "0.1.35" description = "Python SDK for Sophos Firewall" authors = ["Matt Mullen "] readme = "README.md" diff --git a/sophosfirewall_python/templates/updatebackup.j2 b/sophosfirewall_python/templates/updatebackup.j2 index ae56656..e06a148 100644 --- a/sophosfirewall_python/templates/updatebackup.j2 +++ b/sophosfirewall_python/templates/updatebackup.j2 @@ -10,11 +10,13 @@ {{ BackupPrefix | default("") }} {{ FTPServer | default("") }} {{ Username | default("") }} + {% if Password %} {% if "@hashform" in Password %} {{ Password['#text'] }} {% else %} {{ Password | default("") }} {% endif %} + {% endif %} {{ FtpPath | default("") }} {{ EmailAddress | default("") }} {{ BackupFrequency | default("") }} @@ -22,11 +24,13 @@ {{ Hour | default("") }} {{ Minute | default("") }} {{ Date | default("") }} + {% if EncryptionPassword %} {% if "@hashform" in EncryptionPassword %} {{ EncryptionPassword['#text'] }} {% else %} {{ EncryptionPassword | default("") }} {% endif%} + {% endif %}