doc: handle release definition when not being in a git repository

This commit is contained in:
Frédéric Pierret 2018-01-28 12:39:37 +01:00
parent aba6f98cd9
commit 9fe403e3c7
No known key found for this signature in database
GPG Key ID: 1DABC232BE02201E

View File

@ -74,7 +74,10 @@ author = 'Invisible Things Lab'
# The short X.Y version.
version = open('../version').read().strip()
# The full version, including alpha/beta/rc tags.
release = subprocess.check_output(['git', 'describe', '--long', '--dirty']).strip().decode()
try:
release = subprocess.check_output(['git', 'describe', '--long', '--dirty']).strip().decode()
except:
release = "1"
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.