Fehler beim Löschen werden abgefangen
This commit is contained in:
parent
a8a3bdc028
commit
96ef315eee
1 changed files with 5 additions and 2 deletions
|
|
@ -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()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue