summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHarshada Mangesh Kakad <harshadak@metsi.co.uk>2015-12-31 01:48:30 -0800
committerHarshada Mangesh Kakad <harshadak@metsi.co.uk>2015-12-31 01:49:22 -0800
commitb20cdea9b3bb9b4c2f7d67acc399073266083736 (patch)
tree33290adddd4606830b40094bc39976343c3d9740
parent76747d6a497dc36f63a9e0e7c6bc46f355baf227 (diff)
downloadoslo-incubator-b20cdea9b3bb9b4c2f7d67acc399073266083736.tar.gz
Fixing the deprecated library function.
os.popen() is deprecated since version 2.6. Resolved with use of subprocess module. Change-Id: I98322d0644cad26f8c130bb01544ba5eef84d8a3 Partial-Bug: #1529836
-rw-r--r--doc/source/conf.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/doc/source/conf.py b/doc/source/conf.py
index 69689b37..fcc3ecd2 100644
--- a/doc/source/conf.py
+++ b/doc/source/conf.py
@@ -1,6 +1,7 @@
from __future__ import print_function
+import subprocess
import sys
import os
import fileinput
@@ -76,8 +77,11 @@ pygments_style = 'sphinx'
# 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