1
0
Fork 0

checking existence before setting flags

This commit is contained in:
Christian Kühnel 2020-04-16 11:06:26 +02:00
parent 7521aeeda1
commit 66444f4952

View file

@ -153,6 +153,8 @@ def secure_delete(path: str):
return
def del_rw(action, name, exc):
if not os.path.exists(name):
return
os.chmod(name, stat.S_IWRITE)
os.remove(name)