Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

backend_pgf: fix error in exception handling

  • Loading branch information...
commit 6b571899eac97a9b9da4cdf4b90cf9901a7f098a 1 parent f38046b
pwuertz authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/matplotlib/backends/backend_pgf.py
View
4 lib/matplotlib/backends/backend_pgf.py
@@ -711,8 +711,8 @@ def print_pdf(self, filename, *args, **kwargs):
cmdargs = [texcommand, "-interaction=nonstopmode", "-halt-on-error", "figure.tex"]
try:
stdout = subprocess.check_output(cmdargs, stderr=subprocess.STDOUT)
- except:
- raise RuntimeError("%s was not able to process your file.\n\nFull log:\n%s" % (texcommand, stdout))
+ except subprocess.CalledProcessError as e:
+ raise RuntimeError("%s was not able to process your file.\n\nFull log:\n%s" % (texcommand, e.output))
shutil.copyfile("figure.pdf", target)
finally:
os.chdir(cwd)
Please sign in to comment.
Something went wrong with that request. Please try again.