Skip to content

Commit 53909c1

Browse files
deleter: handle files (commaai#24023)
1 parent 9f1c663 commit 53909c1

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

selfdrive/loggerd/deleter.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,10 @@ def deleter_thread(exit_event):
2828

2929
try:
3030
cloudlog.info(f"deleting {delete_path}")
31-
shutil.rmtree(delete_path)
31+
if os.path.isfile(delete_path):
32+
os.remove(delete_path)
33+
else:
34+
shutil.rmtree(delete_path)
3235
break
3336
except OSError:
3437
cloudlog.exception(f"issue deleting {delete_path}")

0 commit comments

Comments
 (0)