From 3ee58a2430dab78dd99b13845a690aadcea7124a Mon Sep 17 00:00:00 2001 From: deajan Date: Tue, 4 Mar 2025 16:35:00 +0100 Subject: [PATCH] Avoid duplicate exclude_files_larger_than treatment --- npbackup/restic_wrapper/__init__.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/npbackup/restic_wrapper/__init__.py b/npbackup/restic_wrapper/__init__.py index bffaca3..f2e41ff 100644 --- a/npbackup/restic_wrapper/__init__.py +++ b/npbackup/restic_wrapper/__init__.py @@ -1002,16 +1002,12 @@ class ResticRunner: if exclude_caches: cmd += " --exclude-caches" - if exclude_files_larger_than: - exclude_files_larger_than = int( - BytesConverter(exclude_files_larger_than).bytes - ) if exclude_files_larger_than: try: # Default --exclude_larger_than unit is bytes exclude_files_larger_than = int( - BytesConverter(exclude_files_larger_than) + BytesConverter(exclude_files_larger_than).bytes ) except ValueError: warning = f"Bogus unit for exclude_files_larger_than value given: {exclude_files_larger_than}"