From c49f46eb2c12f062d0f50128814980dafa712619 Mon Sep 17 00:00:00 2001 From: Maurizio Tomasi Date: Wed, 16 Aug 2023 12:29:36 +0200 Subject: [PATCH] Be more robust against git's output --- browse/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/browse/models.py b/browse/models.py index e0ef116..b011338 100644 --- a/browse/models.py +++ b/browse/models.py @@ -786,7 +786,7 @@ def save_schema( try: this_repo = git.Repo(search_parent_directories=True) git_sha = this_repo.head.object.hexsha - except git.InvalidGitRepositoryError: + except (ValueError, git.InvalidGitRepositoryError): git_sha = "unknown" if release_tag: