Skip to content

Commit a52681e

Browse files
committed
Check for existence of the checkout directory
1 parent 6ce72c8 commit a52681e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

generate_metadata.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,8 @@ def get_projects_metadata(
4646
def get_metadata(
4747
language: Language, repo: str | None, completion: float, clones_dir: str
4848
) -> tuple[int, int]:
49-
if repo:
50-
Repo(Path(clones_dir, 'translations', repo)).git.checkout()
49+
if repo and (repo_path := Path(clones_dir, 'translations', repo)).exists():
50+
Repo(repo_path).git.checkout()
5151
return (
5252
repo
5353
and completion

0 commit comments

Comments
 (0)