Allow docs build without git
When build packages from sdist tarballs, git is not available. So allow building the documentation without git. Change-Id: I2e65c7eb6da2f87d97b8eae9fb7411de66416739
This commit is contained in:
parent
8fddbe2d19
commit
f0f78b84c7
|
@ -106,7 +106,11 @@ version = version_info.version_string()
|
|||
# These variables are passed to the logabug code via html_context.
|
||||
giturl = u'https://git.openstack.org/cgit/openstack/manila/tree/doc/source'
|
||||
git_cmd = "/usr/bin/git log | head -n1 | cut -f2 -d' '"
|
||||
gitsha = os.popen(git_cmd).read().strip('\n')
|
||||
try:
|
||||
gitsha = os.popen(git_cmd).read().strip('\n')
|
||||
except Exception:
|
||||
warnings.warn('Cannot get gitsha.')
|
||||
gitsha = 'unknown'
|
||||
bug_tag = u'docs'
|
||||
# source tree
|
||||
pwd = os.getcwd()
|
||||
|
|
Loading…
Reference in New Issue