summaryrefslogtreecommitdiff
path: root/sphinx/make_mode.py
diff options
context:
space:
mode:
authorTakeshi KOMIYA <i.tkomiya@gmail.com>2018-03-07 23:52:11 +0900
committerTakeshi KOMIYA <i.tkomiya@gmail.com>2018-03-08 16:28:49 +0900
commitf84917b8b12ccc3857efc4da8af11afbcf162994 (patch)
tree190cc1337945a60d635e30c81e62042d766a653a /sphinx/make_mode.py
parent3140deb6909a076359db8508a41c92ba8ff22435 (diff)
downloadsphinx-git-f84917b8b12ccc3857efc4da8af11afbcf162994.tar.gz
Fix #4716: Generation PDF file with TexLive on Windows, file not found error
Diffstat (limited to 'sphinx/make_mode.py')
-rw-r--r--sphinx/make_mode.py24
1 files changed, 18 insertions, 6 deletions
diff --git a/sphinx/make_mode.py b/sphinx/make_mode.py
index 301baed49..c6b179885 100644
--- a/sphinx/make_mode.py
+++ b/sphinx/make_mode.py
@@ -101,22 +101,34 @@ class Make(object):
# type: () -> int
if self.run_generic_build('latex') > 0:
return 1
- with cd(self.builddir_join('latex')):
- return subprocess.call([self.makecmd, 'all-pdf'])
+ try:
+ with cd(self.builddir_join('latex')):
+ return subprocess.call([self.makecmd, 'all-pdf'])
+ except OSError:
+ print('Error: Failed to run: %s' % self.makecmd)
+ return 1
def build_latexpdfja(self):
# type: () -> int
if self.run_generic_build('latex') > 0:
return 1
- with cd(self.builddir_join('latex')):
- return subprocess.call([self.makecmd, 'all-pdf-ja'])
+ try:
+ with cd(self.builddir_join('latex')):
+ return subprocess.call([self.makecmd, 'all-pdf-ja'])
+ except OSError:
+ print('Error: Failed to run: %s' % self.makecmd)
+ return 1
def build_info(self):
# type: () -> int
if self.run_generic_build('texinfo') > 0:
return 1
- with cd(self.builddir_join('texinfo')):
- return subprocess.call([self.makecmd, 'info'])
+ try:
+ with cd(self.builddir_join('texinfo')):
+ return subprocess.call([self.makecmd, 'info'])
+ except OSError:
+ print('Error: Failed to run: %s' % self.makecmd)
+ return 1
def build_gettext(self):
# type: () -> int