deleter: handle files (#24023)
parent
9f1c663ae2
commit
53909c1757
|
@ -28,6 +28,9 @@ def deleter_thread(exit_event):
|
||||||
|
|
||||||
try:
|
try:
|
||||||
cloudlog.info(f"deleting {delete_path}")
|
cloudlog.info(f"deleting {delete_path}")
|
||||||
|
if os.path.isfile(delete_path):
|
||||||
|
os.remove(delete_path)
|
||||||
|
else:
|
||||||
shutil.rmtree(delete_path)
|
shutil.rmtree(delete_path)
|
||||||
break
|
break
|
||||||
except OSError:
|
except OSError:
|
||||||
|
|
Loading…
Reference in New Issue