Browse Source

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
changes/50/265550/1
LiuNanke 6 years ago
parent
commit
5d228de79d
  1. 4
      doc/source/conf.py

4
doc/source/conf.py

@ -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.

Loading…
Cancel
Save