From 9397a87655bc3271afa21fe419cb5a8b1399d930 Mon Sep 17 00:00:00 2001 From: Einar Forselv Date: Wed, 17 Apr 2019 02:44:48 +0200 Subject: [PATCH] Handle exclude patterns --- restic_volume_backup/containers.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/restic_volume_backup/containers.py b/restic_volume_backup/containers.py index 4d2d86d..6a92b7d 100644 --- a/restic_volume_backup/containers.py +++ b/restic_volume_backup/containers.py @@ -68,7 +68,12 @@ class Container: filtered.append(mount) elif self.exclude: - pass + for mount in self.mounts: + for pattern in self.exclude: + if pattern in mount.source: + break + else: + filtered.append(mount) else: return self.mounts