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