Skip to content
Extraits de code Groupes Projets
Valider 51eb35b0 rédigé par François De Keersmaeker's avatar François De Keersmaeker
Parcourir les fichiers

Memory: free files

parent 4ebfdb3f
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
Pipeline #105012 en échec
...@@ -79,8 +79,9 @@ def update_dns_table( ...@@ -79,8 +79,9 @@ def update_dns_table(
if host in localhost: if host in localhost:
## Unbound runs on localhost ## Unbound runs on localhost
proc = subprocess.run(cmd.split(), capture_output=True) proc = subprocess.run(cmd.split(), capture_output=True, text=True)
dns_cache = proc.stdout.decode().strip().split("\n") dns_cache = proc.stdout.strip().split("\n")
del proc
else: else:
## Unbound runs on a remote host ## Unbound runs on a remote host
...@@ -90,6 +91,9 @@ def update_dns_table( ...@@ -90,6 +91,9 @@ def update_dns_table(
# Get the DNS cache # Get the DNS cache
result = remote.run(cmd) result = remote.run(cmd)
dns_cache = result.stdout.strip().split("\n") dns_cache = result.stdout.strip().split("\n")
# Free resources
del remote
del result
else: else:
# Read DNS cache from file # Read DNS cache from file
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter