Fix html_last_updated_fmt for Python3.
html_last_updated_fmt option is interpreted as a byte string in python3, causing Sphinx build to break. This patch makes it utf-8 string. Change-Id: I82de8ad2a254843434e960f8b093ac8bba2ba89b
This commit is contained in:
parent
8c8ae29082
commit
5d9bc554a8
|
@ -164,7 +164,7 @@ html_static_path = ['_static']
|
|||
#html_last_updated_fmt = '%b %d, %Y'
|
||||
git_cmd = "git log --pretty=format:'%ad, commit %h' --date=local -n1"
|
||||
try:
|
||||
html_last_updated_fmt = os.popen(git_cmd).read()
|
||||
html_last_updated_fmt = subprocess.check_output(git_cmd).decode('utf-8')
|
||||
except Exception:
|
||||
warnings.warn('Cannot get last updated time from git repository. '
|
||||
'Not setting "html_last_updated_fmt".')
|
||||
|
|
Loading…
Reference in New Issue