diff options
author | Jenkins <jenkins@review.openstack.org> | 2016-02-11 17:03:11 +0000 |
---|---|---|
committer | Gerrit Code Review <review@openstack.org> | 2016-02-11 17:03:11 +0000 |
commit | acd822506961b09f45fe445c91f32ab66c76dd58 (patch) | |
tree | 7b50bf159dafd12a608c0fe979eb2c0e6a641be1 | |
parent | b17daffd73df425fe573ab6e11990a7327d01f50 (diff) | |
parent | 9ec33ac02ad45e6356cc8e358b9eddfbe23b0f13 (diff) | |
download | python-saharaclient-acd822506961b09f45fe445c91f32ab66c76dd58.tar.gz |
Merge "Replace deprecated library function os.popen() with subprocess"
-rw-r--r-- | doc/source/conf.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/doc/source/conf.py b/doc/source/conf.py index edf454e..1d7e84b 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -15,6 +15,7 @@ # See the License for the specific language governing permissions and # limitations under the License. +import subprocess import sys import os @@ -145,8 +146,10 @@ html_static_path = ['_static'] # If not '', a 'Last updated on:' timestamp is inserted at every page bottom, # using the given strftime format. #html_last_updated_fmt = '%b %d, %Y' -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] # If true, SmartyPants will be used to convert quotes and dashes to # typographically correct entities. |