Fix html_last_updated_fmt for Python3
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: I1033016ffdaa83e216cffab7cf9713bee7fba758
This commit is contained in:
parent
a29c084cb1
commit
1a0ee9a787
@ -62,8 +62,7 @@ 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].decode('utf-8')
|
||||
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".')
|
||||
|
Loading…
Reference in New Issue
Block a user