Allow docs build without git
When build packages from sdist tarballs, git is not available. So
allow building the documentation without git.
@@ -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' '"
+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()
