Skip to content

Commit

Permalink
Fix doc generation for Python3
Browse files Browse the repository at this point in the history
Fix the Sphinx html_last_updated_fmt for Python3.
The html_last_updated_fmt option is interpeted as a
byte string in python3, causing Sphinx build to break.
This patch makes it utf-8 string.

Change-Id: I9acc4200751e63fa29be738cfa00c4637efd8287
  • Loading branch information
M V P Nitesh committed Apr 17, 2017
1 parent 3c06d0a commit 776241e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
3 changes: 1 addition & 2 deletions api-ref/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,8 +163,7 @@
git_cmd = ["git", "log", "--pretty=format:'%ad, commit %h'", "--date=local",
"-n1"]
try:
html_last_updated_fmt = subprocess.Popen(
git_cmd, stdout=subprocess.PIPE).communicate()[0]
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".')
Expand Down
3 changes: 1 addition & 2 deletions doc/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -188,8 +188,7 @@
git_cmd = ["git", "log", "--pretty=format:'%ad, commit %h'", "--date=local",
"-n1"]
try:
html_last_updated_fmt = subprocess.Popen(
git_cmd, stdout=subprocess.PIPE).communicate()[0]
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".')
Expand Down

0 comments on commit 776241e

Please sign in to comment.