From 96ef315eee8059062e3286b0be81df96cccdbc8e Mon Sep 17 00:00:00 2001 From: hubobel Date: Mon, 29 Dec 2025 16:35:26 +0100 Subject: [PATCH] =?UTF-8?q?Fehler=20beim=20L=C3=B6schen=20werden=20abgefan?= =?UTF-8?q?gen?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Simbriefimport.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Simbriefimport.py b/Simbriefimport.py index 73f49c1..e276260 100644 --- a/Simbriefimport.py +++ b/Simbriefimport.py @@ -462,8 +462,11 @@ def zufName(geschlecht): return random.choice(data["Mann"]) def delete(pfad_ogg): if pfad_ogg.exists(): - pfad_ogg.unlink() - logging.info("Datei gelöscht: %s", pfad_ogg) + try: + pfad_ogg.unlink() + logging.info("Datei gelöscht: %s", pfad_ogg) + except: + logging.info("Datei gerade in Benutzung: %s", pfad_ogg) return None host = os.getcwd()