From 9fe403e3c72050b86072d55a77fcca34387c3b66 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Pierret?= Date: Sun, 28 Jan 2018 12:39:37 +0100 Subject: [PATCH] doc: handle release definition when not being in a git repository --- doc/conf.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/doc/conf.py b/doc/conf.py index ec429c9..5b20c01 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -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.