Browse Source

Merge "Fix doc generation for Python3"

tags/15.0.0.0b3
Jenkins 1 year ago
parent
commit
f786c9270e
2 changed files with 2 additions and 4 deletions
  1. 1
    2
      api-ref/source/conf.py
  2. 1
    2
      doc/source/conf.py

+ 1
- 2
api-ref/source/conf.py View File

@@ -166,8 +166,7 @@ git_cmd = [
166 166
     "git", "log", "--pretty=format:'%ad, commit %h'", "--date=local", "-n1"
167 167
 ]
168 168
 try:
169
-    html_last_updated_fmt = subprocess.Popen(
170
-        git_cmd, stdout=subprocess.PIPE).communicate()[0]
169
+    html_last_updated_fmt = subprocess.check_output(git_cmd).decode('utf-8')
171 170
 except Exception:
172 171
     warnings.warn('Cannot get last updated time from git repository. '
173 172
                   'Not setting "html_last_updated_fmt".')

+ 1
- 2
doc/source/conf.py View File

@@ -212,8 +212,7 @@ html_static_path = ['_static']
212 212
 git_cmd = ["git", "log", "--pretty=format:'%ad, commit %h'", "--date=local",
213 213
    "-n1"]
214 214
 try:
215
-    html_last_updated_fmt = subprocess.Popen(
216
-        git_cmd, stdout=subprocess.PIPE).communicate()[0]
215
+    html_last_updated_fmt = subprocess.check_output(git_cmd).decode('utf-8')
217 216
 except Exception:
218 217
     warnings.warn('Cannot get last updated time from git repository. '
219 218
                   'Not setting "html_last_updated_fmt".')

Loading…
Cancel
Save