Fix docs failures caused by latest eventlet

Change-Id: I3aed40314d3df86716991d9815ead910bd5dceee
Closes-bug: #1674687
This commit is contained in:
Davanum Srinivas 2017-03-21 13:28:00 -04:00
parent 13069a7de3
commit 3cc7fa6485

View File

@ -22,13 +22,20 @@
# All configuration values have a default; values that are commented out
# serve to show the default.
import subprocess
import eventlet
import sys
import os
import warnings
import openstackdocstheme
# NOTE(dims): monkey patch subprocess to prevent failures in latest eventlet
# See https://github.com/eventlet/eventlet/issues/398
try:
eventlet.monkey_patch(subprocess=True)
except TypeError:
pass
# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
@ -206,6 +213,7 @@ git_cmd = [
"git", "log", "--pretty=format:'%ad, commit %h'", "--date=local", "-n1"
]
try:
import subprocess
html_last_updated_fmt = subprocess.check_output(git_cmd).decode('utf-8')
except Exception:
warnings.warn('Cannot get last updated time from git repository. '