From f82e2c3e622e5da357f492c7d7abdc86c48136dd Mon Sep 17 00:00:00 2001
From: Marco Biasini <marco.biasini@unibas.ch>
Date: Thu, 14 Jun 2012 14:30:35 +0200
Subject: [PATCH] use check_call instead of os.system

---
 doc/make.py | 24 +++++++++++++++---------
 1 file changed, 15 insertions(+), 9 deletions(-)

diff --git a/doc/make.py b/doc/make.py
index 8fb157390..ed5a4cabc 100644
--- a/doc/make.py
+++ b/doc/make.py
@@ -2,7 +2,7 @@ import os, sys, re
 import shutil
 from ost import settings
 from optparse import OptionParser
-
+import subprocess
 
 if len(sys.argv)==2:
   root_dir=sys.argv[1]
@@ -89,14 +89,20 @@ for sub_dir in ('modules',):
 sphinx_bin=settings.Locate(['sphinx-build', 'sphinx-build-2.6'])
 
 if opts.html:
-  os.system('%s %s -b html -c %s %s %s' % (sphinx_bin, opt_str, 'doc/conf', 'doc/source', 
-                                      'doc/build/html'))
+  cmd='%s %s -b html -c %s %s %s' % (sphinx_bin, opt_str, 
+                                     'doc/conf', 'doc/source', 'doc/build/html')
+  print cmd
+  subprocess.check_call(cmd, shell=True)
 if opts.doctest:
-  os.system('%s %s -b doctest -c %s %s %s' % (sphinx_bin, opt_str, 'doc/conf', 'doc/source', 
-                                      'doc/build/doctest'))
+  cmd='%s %s -b doctest -c %s %s %s' % (sphinx_bin, opt_str, 
+                                        'doc/conf', 'doc/source', 
+                                        'doc/build/doctest')
+  subprocess.check_call(cmd, shell=True)
 if opts.build_json:
-  os.system('%s %s -b json -c %s %s %s' % (sphinx_bin, opt_str, 'doc/conf', 'doc/source',
-                                      'doc/build/json'))
+  cmd='%s %s -b json -c %s %s %s' % (sphinx_bin, opt_str, 'doc/conf', 
+                                     'doc/source', 'doc/build/json')
+  subprocess.check_call(cmd, shell=True)
 if opts.linkcheck:
-  os.system('%s %s -b linkcheck -c %s %s %s' % (sphinx_bin, opt_str, 'doc/conf', 'doc/source', 
-                                      'doc/build/check'))
+  cmd='%s %s -b linkcheck -c %s %s %s' % (sphinx_bin, opt_str, 'doc/conf', 
+                                          'doc/source', 'doc/build/check')
+  subprocess.check_call(cmd, shell=True)
-- 
GitLab