Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

backend_pgf: handle OSError when testing for xelatex/pdflatex #1171

Merged
merged 1 commit into from

2 participants

@pwuertz
Collaborator

Fixed an OSError showing up on the travis-ci platform that originates from a missing try-except block when testing for xelatex/pdflatex in test_backend_pgf.

@pwuertz pwuertz merged commit 9aab0be into from
@travisbot

This pull request fails (merged 034b5d5 into 236ee03).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Aug 29, 2012
This page is out of date. Refresh to see the latest.
Showing with 7 additions and 4 deletions.
  1. +7 −4 lib/matplotlib/tests/test_backend_pgf.py
View
11 lib/matplotlib/tests/test_backend_pgf.py
@@ -22,10 +22,13 @@ def check_for(texsystem):
\makeatletter
\@@end
"""
- latex = subprocess.Popen(["xelatex", "-halt-on-error"],
- stdin=subprocess.PIPE,
- stdout=subprocess.PIPE)
- stdout, stderr = latex.communicate(header.encode("utf8"))
+ try:
+ latex = subprocess.Popen(["xelatex", "-halt-on-error"],
+ stdin=subprocess.PIPE,
+ stdout=subprocess.PIPE)
+ stdout, stderr = latex.communicate(header.encode("utf8"))
+ except OSError:
+ return False
return latex.returncode == 0
Something went wrong with that request. Please try again.