Skip to content

Commit 3a51582

Browse files
committed
Merge branch 'dev' into 296-ensure-all-examples-are-up-to-date-and-verified
2 parents 05d2d52 + 659df9b commit 3a51582

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

simvue/metadata.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
"""
88

99
import typing
10-
import git
1110
import json
1211

1312

@@ -28,6 +27,11 @@ def git_info(repository: str) -> dict[str, typing.Any]:
2827
dict[str, typing.Any]
2928
metadata for the target repository
3029
"""
30+
try:
31+
import git
32+
except ImportError:
33+
return {}
34+
3135
try:
3236
git_repo = git.Repo(repository, search_parent_directories=True)
3337
current_commit: git.Commit = git_repo.head.commit

0 commit comments

Comments
 (0)