Replace deprecated library function os.popen() with subprocess

os.popen() is deprecated since version 2.6. Resolved with use of
subprocess module.
Closes-bug: #1529836

Change-Id: I3701a14026a85898bc01f3102369a2f87de56015
This commit is contained in:
LiuNanke 2016-01-09 21:55:24 +08:00
parent 2145c9bf5a
commit 5d228de79d

View File

@ -162,9 +162,9 @@ html_static_path = []
# using the given strftime format.
#html_last_updated_fmt = '%b %d, %Y'
git_cmd = ["git", "log", "--pretty=format:'%ad, commit %h'", "--date=local",
"-n1"]
"-n1"]
html_last_updated_fmt = subprocess.Popen(git_cmd,
stdout=subprocess.PIPE).communicate()[0]
stdout=subprocess.PIPE).communicate()[0]
# If true, SmartyPants will be used to convert quotes and dashes to
# typographically correct entities.