From 116af4c0ea6f145806dbb42677444d7121accc12 Mon Sep 17 00:00:00 2001 From: Vincent Bidolet Date: Mon, 13 Nov 2023 17:22:19 +0100 Subject: [PATCH] adding *better* filtering --- main.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/main.py b/main.py index 103fafa..792ee72 100644 --- a/main.py +++ b/main.py @@ -208,10 +208,12 @@ def backup_services(servicename: str, servicesdict: dict, composefilepath: str) bindpath = bind.split(":")[0] if arguments.bindexclude not in ("", None) and bindpath.find( arguments.bindexclude) != -1: + print(f" {bindpath} is matching the exclusion pattern, skipping.") # on a un filtre d'exclusion et il matche, donc on ne backup pas pass - elif arguments.bindinclude not in ("", None) and bindpath.find( + elif arguments.bindinclude not in ("", None) and not bindpath.find( arguments.bindinclude) != -1: + print(f" {bindpath} is not matching the inclusion pattern, skipping.") # on a un filtre d'inclusion et il ne matche pas, donc on ne backup pas pass else: