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:
lioplhp 2017-06-20 21:43:47 +08:00
parent 8c8ae29082
commit 5d9bc554a8
1 changed files with 1 additions and 1 deletions

View File

@ -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".')