From a8b43c286fae520a9f9821801b6b46e861807136 Mon Sep 17 00:00:00 2001 From: Edwin Eefting Date: Thu, 27 Jan 2022 16:12:17 +0100 Subject: [PATCH] suppress exclude recieved warning when its already specified. #101 --- zfs_autobackup/ZfsAuto.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/zfs_autobackup/ZfsAuto.py b/zfs_autobackup/ZfsAuto.py index be67e0a..f570fea 100644 --- a/zfs_autobackup/ZfsAuto.py +++ b/zfs_autobackup/ZfsAuto.py @@ -82,8 +82,9 @@ class ZfsAuto(object): self.verbose("NOTE: Source and target are on the same host, excluding target-path from selection.") self.exclude_paths.append(args.target_path) else: - self.verbose("NOTE: Source and target are on the same host, excluding received datasets from selection.") - args.exclude_received = True + if not args.exclude_received: + self.verbose("NOTE: Source and target are on the same host, adding --exclude-received to commandline.") + args.exclude_received = True if args.test: self.warning("TEST MODE - SIMULATING WITHOUT MAKING ANY CHANGES")