diff options
author | Harshada Mangesh Kakad <harshadak@metsi.co.uk> | 2016-01-14 04:35:58 -0800 |
---|---|---|
committer | Harshada Mangesh Kakad <harshadak@metsi.co.uk> | 2016-01-14 04:36:40 -0800 |
commit | 57a07454fc171fb214b57325f44ce3adbe8d8704 (patch) | |
tree | a079cef87af11e11a70eb3e8feb48445fc0e37f4 | |
parent | d75fa8911586f4769679e36424305f76e58250a1 (diff) | |
download | osprofiler-57a07454fc171fb214b57325f44ce3adbe8d8704.tar.gz |
Replace deprecated library function os.popen() with subprocess
os.popen() is deprecated since version 2.6. Resolved with use of
subprocess module.
Change-Id: I5e8a3cb1d2a50656025ca0fec5f95b581f0af7b4
Closes-Bug: #1529836
-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 cc18c90..8854a5b 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -13,6 +13,7 @@ import datetime import os +import subprocess import sys # If extensions (or modules to document with autodoc) are in another directory, @@ -137,8 +138,10 @@ html_static_path = [] # If not '', a 'Last updated on:' timestamp is inserted at every page bottom, # using the given strftime format. -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. |