Reformat file with black

This commit is contained in:
deajan 2024-06-04 12:29:53 +02:00
parent e14cba4114
commit 38b36f03bb

View file

@ -1247,7 +1247,10 @@ class NPBackupRunner:
for entry in ["last", "hourly", "daily", "weekly", "monthly", "yearly"]:
value = self.repo_config.g(f"repo_opts.retention_policy.{entry}")
if value:
if not self.repo_config.g("repo_opts.retention_policy.keep_within") or entry == "last":
if (
not self.repo_config.g("repo_opts.retention_policy.keep_within")
or entry == "last"
):
policy[f"keep-{entry}"] = value
else:
# We need to add a type value for keep-within