From 6bb11f4db229a9bfbad14566a3730f5ac5a806d0 Mon Sep 17 00:00:00 2001 From: Vincent Bidolet Date: Mon, 13 Nov 2023 17:20:36 +0100 Subject: [PATCH] adding *better* filtering --- main.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main.py b/main.py index 27ad3b9..103fafa 100644 --- a/main.py +++ b/main.py @@ -206,11 +206,11 @@ def backup_services(servicename: str, servicesdict: dict, composefilepath: str) if "Binds" in container.attrs["HostConfig"] and len(container.attrs["HostConfig"]["Binds"]): for bind in container.attrs["HostConfig"]["Binds"]: bindpath = bind.split(":")[0] - if arguments.bindexclude not in ("", None) and dependencie.find( + if arguments.bindexclude not in ("", None) and bindpath.find( arguments.bindexclude) != -1: # on a un filtre d'exclusion et il matche, donc on ne backup pas pass - elif arguments.bindinclude not in ("", None) and dependencie.find( + elif arguments.bindinclude not in ("", None) and bindpath.find( arguments.bindinclude) != -1: # on a un filtre d'inclusion et il ne matche pas, donc on ne backup pas pass