diff options
author | Jenkins <jenkins@review.openstack.org> | 2016-01-20 21:38:39 +0000 |
---|---|---|
committer | Gerrit Code Review <review@openstack.org> | 2016-01-20 21:38:39 +0000 |
commit | 8a7729110a5ab203c363fdf5cc0a2f1dc069bf66 (patch) | |
tree | d5f359cc664ac156b56714c1f59988e84a078b0a | |
parent | 56290c3c0d82565df803801415632f44afd14dc4 (diff) | |
parent | 120f25e09beebf18df552a79d9fabec81f44a4c7 (diff) | |
download | glance_store-8a7729110a5ab203c363fdf5cc0a2f1dc069bf66.tar.gz |
Merge "Replace deprecated library function os.popen() with subprocess"
-rw-r--r-- | doc/source/conf.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/doc/source/conf.py b/doc/source/conf.py index 2aae26d..0b05441 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -1,6 +1,7 @@ # -*- coding: utf-8 -*- import os +import subprocess import sys sys.path.insert(0, os.path.abspath('../..')) @@ -48,8 +49,11 @@ html_static_path = ['static'] # Output file base name for HTML help builder. htmlhelp_basename = '%sdoc' % project -git_cmd = "git log --pretty=format:'%ad, commit %h' --date=local -n1" -html_last_updated_fmt = os.popen(git_cmd).read() +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] + # Grouping the document tree into LaTeX files. List of tuples # (source start file, target name, title, author, documentclass |