Skip to content
This repository has been archived by the owner on May 25, 2022. It is now read-only.

Commit

Permalink
Try to prevent backend screwery when importing matplotlib.pyplot.
Browse files Browse the repository at this point in the history
  • Loading branch information
embray committed Mar 4, 2015
1 parent ef82072 commit 8e17135
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions ah_bootstrap.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,8 @@
# process can mitigate this (note importing matplotlib.pyplot has the same
# issue)
try:
import matplotlib
matplotlib.use('Agg')
import matplotlib.pyplot
except:
# Ignore if this fails for *any* reason*
Expand Down
2 changes: 2 additions & 0 deletions astropy_helpers/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@
# process can mitigate this (note importing matplotlib.pyplot has the same
# issue)
try:
import matplotlib
matplotlib.use('Agg')
import matplotlib.pyplot
except:
# Ignore if this fails for *any* reason*
Expand Down

0 comments on commit 8e17135

Please sign in to comment.