diff --git a/doc/source/conf.py b/doc/source/conf.py index f48169fb..e975ee8f 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -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()