Fix docs failures caused by latest eventlet
Change-Id: I3aed40314d3df86716991d9815ead910bd5dceee Closes-bug: #1674687
This commit is contained in:
parent
13069a7de3
commit
3cc7fa6485
@ -22,13 +22,20 @@
|
|||||||
# All configuration values have a default; values that are commented out
|
# All configuration values have a default; values that are commented out
|
||||||
# serve to show the default.
|
# serve to show the default.
|
||||||
|
|
||||||
import subprocess
|
import eventlet
|
||||||
import sys
|
import sys
|
||||||
import os
|
import os
|
||||||
import warnings
|
import warnings
|
||||||
|
|
||||||
import openstackdocstheme
|
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,
|
# 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
|
# 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.
|
# 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"
|
"git", "log", "--pretty=format:'%ad, commit %h'", "--date=local", "-n1"
|
||||||
]
|
]
|
||||||
try:
|
try:
|
||||||
|
import subprocess
|
||||||
html_last_updated_fmt = subprocess.check_output(git_cmd).decode('utf-8')
|
html_last_updated_fmt = subprocess.check_output(git_cmd).decode('utf-8')
|
||||||
except Exception:
|
except Exception:
|
||||||
warnings.warn('Cannot get last updated time from git repository. '
|
warnings.warn('Cannot get last updated time from git repository. '
|
||||||
|
Loading…
Reference in New Issue
Block a user