summaryrefslogtreecommitdiff
path: root/sphinx/make_mode.py
diff options
context:
space:
mode:
authorDmitry Shachnev <mitya57@gmail.com>2017-09-18 15:42:57 +0300
committerDmitry Shachnev <mitya57@gmail.com>2017-09-18 15:42:57 +0300
commit4475fc80c5a301db63e61fbca99f05f287d4137b (patch)
treef85d2dc29cb2cce334f453c1a3f67c7b6d22b834 /sphinx/make_mode.py
parent666a69b286f13132073ad6a02addbf1baa94d487 (diff)
downloadsphinx-git-4475fc80c5a301db63e61fbca99f05f287d4137b.tar.gz
Return non-zero exit status when make subprocess fails
For example, when latexmk is not installed.
Diffstat (limited to 'sphinx/make_mode.py')
-rw-r--r--sphinx/make_mode.py10
1 files changed, 4 insertions, 6 deletions
diff --git a/sphinx/make_mode.py b/sphinx/make_mode.py
index 9fe7ecebf..e7962db2e 100644
--- a/sphinx/make_mode.py
+++ b/sphinx/make_mode.py
@@ -18,6 +18,7 @@ from __future__ import print_function
import os
import sys
+import subprocess
from os import path
import sphinx
@@ -196,16 +197,14 @@ class Make(object):
if self.run_generic_build('latex') > 0:
return 1
with cd(self.builddir_join('latex')):
- os.system('%s all-pdf' % self.makecmd)
- return 0
+ return subprocess.call([self.makecmd, 'all-pdf'])
def build_latexpdfja(self):
# type: () -> int
if self.run_generic_build('latex') > 0:
return 1
with cd(self.builddir_join('latex')):
- os.system('%s all-pdf-ja' % self.makecmd)
- return 0
+ return subprocess.call([self.makecmd, 'all-pdf-ja'])
def build_text(self):
# type: () -> int
@@ -231,8 +230,7 @@ class Make(object):
if self.run_generic_build('texinfo') > 0:
return 1
with cd(self.builddir_join('texinfo')):
- os.system('%s info' % self.makecmd)
- return 0
+ return subprocess.call([self.makecmd, 'info'])
def build_gettext(self):
# type: () -> int