correction bug nettoyage des fichiers /tmp/docker-inventaire

This commit is contained in:
fab committed 2026-11-13 11:08:49 +01:00
1 parent f1e971ced6
commit 25a5f52826
1 file changed
+7
@@ -7,6 +7,8 @@ import tempfile
import threading
import time
import subprocess
import glob
import shutil
from http.server import BaseHTTPRequestHandler, HTTPServer
from urllib.parse import quote
@@ -1191,6 +1193,11 @@ def git_archive():
f"Git : récupération de {GIT_URL}"
)
# Nettoyage des archives temporaires précédentes
for path in glob.glob("/tmp/docker-inventaire-*"):
if os.path.isdir(path):
shutil.rmtree(path, ignore_errors=True)
tempdir = tempfile.mkdtemp(
prefix="docker-inventaire-"
)