dvc: generate version even without gitpython

This commit is contained in:
Ruslan Kuprieiev
2019-02-09 21:07:17 +02:00
committed by GitHub
parent bac1393fc2
commit 8b35c69a95
+5 -2
View File
@@ -20,8 +20,11 @@ VERSIONPATH = os.path.join(PACKAGEPATH, "version.py")
def _update_version_file():
"""Dynamically update version file."""
from git import Repo
from git.exc import InvalidGitRepositoryError
try:
from git import Repo
from git.exc import InvalidGitRepositoryError
except ImportError:
return __version__
try:
repo = Repo(HOMEPATH)