buckets needs to be reset each loop

This commit is contained in:
Rikard Danielsson 2025-03-06 15:42:32 +01:00
parent 4b952bac40
commit 0b3a2d43cb
Signed by untrusted user: richir
GPG key ID: 584D2AA2FA669135

View file

@ -7,7 +7,6 @@ import subprocess
import sys
exit = 0
buckets = []
bucket_count = {}
containers = {}
base_message = "OK: no duplicate mounts"
@ -17,6 +16,7 @@ get_containers = subprocess.Popen('/usr/local/bin/get_containers', stdout=subpro
containers = get_containers.decode().splitlines()
for i, container in enumerate(containers, start=1):
buckets = []
list_command = f"/usr/local/bin/nocc {container} files_external:list --all --show-password --output json"
command = shlex.split(list_command)
mount_data_byte = subprocess.Popen(command, stdout=subprocess.PIPE).stdout.read()