Skip to content

Commit

Permalink
Fix [updatettracker] remove dir
Browse files Browse the repository at this point in the history
  • Loading branch information
NMD03 committed Mar 7, 2024
1 parent 739e36c commit 161813c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion build/update_tracker.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import subprocess
import re
import os
import shutil
from time import sleep
from typing import List, Optional
from pathlib import Path
Expand Down Expand Up @@ -76,7 +77,7 @@ def cleanup(self, num_to_keep: int) -> None:
if len(repo_images) > num_to_keep:
repo_images.sort(key=lambda x: os.path.getmtime(os.path.join(self.outputdir, x)))
for image in repo_images[:-num_to_keep]:
os.remove(os.path.join(self.outputdir, image))
shutil.rmtree(os.path.join(self.outputdir, image))

class GitHub(Repo):
"""Class for tracking GitHub repositories."""
Expand Down

0 comments on commit 161813c

Please sign in to comment.