summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVu Cong Tuan <tuanvc@vn.fujitsu.com>2017-06-16 20:50:07 +0700
committerVu Cong Tuan <tuanvc@vn.fujitsu.com>2017-06-16 20:50:42 +0700
commit9420ea2c507a18a819edc885969265ea1e140ca1 (patch)
tree0436153314f1fc26dce9940a596f12da01269458
parentb865f3b6af55809e3c67c02059d26f4b40a63490 (diff)
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. Changing Popen to .check_output because of 2 reasons: 1. check_output() will raise CalledProcessError if the called process returns a non-zero return code. 2. For consistency with keystone [1] and cinder [2] [1] https://review.openstack.org/#/c/457142 [2] https://review.openstack.org/#/c/433081 Change-Id: I810f841097c64c5e73db42ca393f6179182d9694
Notes
Notes (review): Code-Review+2: Eric Fried <efried@us.ibm.com> Code-Review+2: Matthew Edmonds <edmondsw@us.ibm.com> Verified+1: IBM PowerVM CI <powervmci@linux.vnet.ibm.com> Workflow+1: Eric Fried <efried@us.ibm.com> Verified+2: Jenkins Submitted-by: Jenkins Submitted-at: Tue, 20 Jun 2017 17:14:19 +0000 Reviewed-on: https://review.openstack.org/474861 Project: openstack/ceilometer-powervm Branch: refs/heads/master
-rw-r--r--doc/source/conf.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/doc/source/conf.py b/doc/source/conf.py
index 4bc5acc..f73b770 100644
--- a/doc/source/conf.py
+++ b/doc/source/conf.py
@@ -143,9 +143,8 @@ pygments_style = 'sphinx'
143# using the given strftime format. 143# using the given strftime format.
144#html_last_updated_fmt = '%b %d, %Y' 144#html_last_updated_fmt = '%b %d, %Y'
145git_cmd = ["git", "log", "--pretty=format:'%ad, commit %h'", "--date=local", 145git_cmd = ["git", "log", "--pretty=format:'%ad, commit %h'", "--date=local",
146 "-n1"] 146 "-n1"]
147html_last_updated_fmt = subprocess.Popen( 147html_last_updated_fmt = subprocess.check_output(git_cmd).decode('utf-8')
148 git_cmd, stdout=subprocess.PIPE).communicate()[0]
149 148
150# If true, SmartyPants will be used to convert quotes and dashes to 149# If true, SmartyPants will be used to convert quotes and dashes to
151# typographically correct entities. 150# typographically correct entities.