Skip to content

Commit

Permalink
fix(backend): try catch around git import avoid errors in git executa…
Browse files Browse the repository at this point in the history
…ble not found
  • Loading branch information
alonh committed Jan 19, 2023
1 parent 4ff4e7f commit 667a3cc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions label_sleuth/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
import tempfile
import traceback
import zipfile
import git
import pkg_resources

from concurrent.futures.thread import ThreadPoolExecutor
Expand Down Expand Up @@ -1221,7 +1220,8 @@ def get_git_describe():
Returns:
an object with version and source fields
"""
try:
try:
import git
repo = git.repo.Repo(os.path.abspath(os.path.join(__file__, os.pardir, os.pardir)))
version = repo.git.describe(tags=True)
source = 'git'
Expand Down

0 comments on commit 667a3cc

Please sign in to comment.