From a9347cb369137b94641a5cfa3fbdac46c617c5a0 Mon Sep 17 00:00:00 2001 From: Nguyen Hung Phuong Date: Tue, 17 Jul 2018 14:56:01 +0700 Subject: [PATCH] Fix html_last_updated_fmt for Python 3 The previous version returned a byte string, which caused errors on Python 3. I borrowed the fix from [1]. Change-Id: If89a3808271756925708e5f48f4a9726b5e25aec 1: https://git.openstack.org/cgit/openstack/cinder/commit/?id=9dc4c8704eef2e48fbae992db094be7ac91f8c6c --- doc/source/conf.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/doc/source/conf.py b/doc/source/conf.py index 93b0331e..2a3d2dd2 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -133,8 +133,7 @@ html_theme = 'nature' # using the given strftime format. git_cmd = ["git", "log", "--pretty=format:'%ad, commit %h'", "--date=local", "-n1"] -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') # If true, SmartyPants will be used to convert quotes and dashes to # typographically correct entities.