From 6c8a32c6de3ad240bf82dab54fb240860277b348 Mon Sep 17 00:00:00 2001 From: Sharat Sharma Date: Mon, 17 Apr 2017 16:14:58 +0530 Subject: [PATCH] Fix doc generation for python 3 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: Ib38acb2385bc55bc1167460cff10af5e5287467e --- doc/source/conf.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/source/conf.py b/doc/source/conf.py index f56fe9ba..b9f1d91b 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -121,8 +121,8 @@ htmlhelp_basename = '%sdoc' % project 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".')