From 14a1de8c62840c98eec46ced721f1e996bdd8854 Mon Sep 17 00:00:00 2001 From: real-yfprojects Date: Sat, 5 Nov 2022 10:29:07 +0100 Subject: [PATCH] Add missing brackets fixing `BorgListArchiveJob`. In python `+` takes precedence over the `if-else` operator. Therefore brackets are needed around the latter. * src/vorta/borg/list_archive.py (BorgListArchiveJob.prepare) --- src/vorta/borg/list_archive.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/vorta/borg/list_archive.py b/src/vorta/borg/list_archive.py index 0c895a84..67cd19a2 100644 --- a/src/vorta/borg/list_archive.py +++ b/src/vorta/borg/list_archive.py @@ -27,9 +27,9 @@ def prepare(cls, profile, archive_name): '--json-lines', '--format', # fields to include in json output - "{mode}{user}{group}{size}{" + 'isomtime' - if borg_compat.check('V122') - else 'mtime' + "}{path}{source}{health}{NL}", + "{mode}{user}{group}{size}{" + + ('isomtime' if borg_compat.check('V122') else 'mtime') + + "}{path}{source}{health}{NL}", ] ret['ok'] = True