Skip to content

Commit 161813c

Browse files
committed
Fix [updatettracker] remove dir
1 parent 739e36c commit 161813c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

build/update_tracker.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import subprocess
44
import re
55
import os
6+
import shutil
67
from time import sleep
78
from typing import List, Optional
89
from pathlib import Path
@@ -76,7 +77,7 @@ def cleanup(self, num_to_keep: int) -> None:
7677
if len(repo_images) > num_to_keep:
7778
repo_images.sort(key=lambda x: os.path.getmtime(os.path.join(self.outputdir, x)))
7879
for image in repo_images[:-num_to_keep]:
79-
os.remove(os.path.join(self.outputdir, image))
80+
shutil.rmtree(os.path.join(self.outputdir, image))
8081

8182
class GitHub(Repo):
8283
"""Class for tracking GitHub repositories."""

0 commit comments

Comments
 (0)