summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2016-04-12 08:38:19 +0000
committerGerrit Code Review <review@openstack.org>2016-04-12 08:38:19 +0000
commitd5020aed64e150c7e06705d316ba3ee074be983d (patch)
treec60b31537e548758772ba7795d781a7c5b98e23c
parente5a95afabc2c040aadac2e7613917da33f94f4a6 (diff)
parent038b614d2efdd784f8b0ebc5433751c2765ab56c (diff)
Merge "Fix doc build if git is absent"2.6.0
-rw-r--r--doc/source/conf.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/doc/source/conf.py b/doc/source/conf.py
index 26117aa..9be29ee 100644
--- a/doc/source/conf.py
+++ b/doc/source/conf.py
@@ -17,6 +17,7 @@ from __future__ import unicode_literals
17import os 17import os
18import subprocess 18import subprocess
19import sys 19import sys
20import warnings
20 21
21import pbr.version 22import pbr.version
22 23
@@ -150,8 +151,12 @@ modindex_common_prefix = ['keystoneauth1.']
150# using the given strftime format. 151# using the given strftime format.
151git_cmd = ["git", "log", "--pretty=format:'%ad, commit %h'", "--date=local", 152git_cmd = ["git", "log", "--pretty=format:'%ad, commit %h'", "--date=local",
152 "-n1"] 153 "-n1"]
153html_last_updated_fmt = subprocess.Popen( 154try:
154 git_cmd, stdout=subprocess.PIPE).communicate()[0] 155 html_last_updated_fmt = subprocess.Popen(
156 git_cmd, stdout=subprocess.PIPE).communicate()[0]
157except:
158 warnings.warn('Cannot get last updated time from git repository. '
159 'Not setting "html_last_updated_fmt".')
155 160
156# If true, SmartyPants will be used to convert quotes and dashes to 161# If true, SmartyPants will be used to convert quotes and dashes to
157# typographically correct entities. 162# typographically correct entities.