adding *better* filtering
This commit is contained in:
4
main.py
4
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"]):
|
if "Binds" in container.attrs["HostConfig"] and len(container.attrs["HostConfig"]["Binds"]):
|
||||||
for bind in container.attrs["HostConfig"]["Binds"]:
|
for bind in container.attrs["HostConfig"]["Binds"]:
|
||||||
bindpath = bind.split(":")[0]
|
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:
|
arguments.bindexclude) != -1:
|
||||||
# on a un filtre d'exclusion et il matche, donc on ne backup pas
|
# on a un filtre d'exclusion et il matche, donc on ne backup pas
|
||||||
pass
|
pass
|
||||||
elif arguments.bindinclude not in ("", None) and dependencie.find(
|
elif arguments.bindinclude not in ("", None) and bindpath.find(
|
||||||
arguments.bindinclude) != -1:
|
arguments.bindinclude) != -1:
|
||||||
# on a un filtre d'inclusion et il ne matche pas, donc on ne backup pas
|
# on a un filtre d'inclusion et il ne matche pas, donc on ne backup pas
|
||||||
pass
|
pass
|
||||||
|
|||||||
Reference in New Issue
Block a user