Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 3a20ff9

Browse files
committed
texmanager.make_dvi now raises an error if LaTeX failed to create an output file
svn path=/branches/v0_98_5_maint/; revision=7033
1 parent 82880e6 commit 3a20ff9

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

CHANGELOG

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
2009-04-06 texmanager.make_dvi now raises an error if LaTeX failed to
2+
create an output file. Thanks to Joao Luis Silva for reporting
3+
this. - JKS
4+
15
2009-04-05 _png.read_png() reads 12 bit PNGs (patch from
26
Tobias Wood) - ADS
37

lib/matplotlib/texmanager.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,12 @@ def make_dvi(self, tex, fontsize):
285285
fh.close()
286286
except IOError:
287287
report = 'No latex error report available.'
288-
if exit_status:
288+
try:
289+
os.stat(dvifile)
290+
exists = True
291+
except OSError:
292+
exists = False
293+
if exit_status or not exists:
289294
raise RuntimeError(('LaTeX was not able to process the following \
290295
string:\n%s\nHere is the full report generated by LaTeX: \n\n'% repr(tex)) + report)
291296
else: mpl.verbose.report(report, 'debug')

0 commit comments

Comments
 (0)