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

Skip to content

Commit d1dd52a

Browse files
committed
Merge pull request matplotlib#2693 from cgohlke/patch-1
Use mpl.checkdep_ghostscript function to find ghostscript
2 parents 3284b17 + ad10a58 commit d1dd52a

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

lib/matplotlib/backends/backend_pgf.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -170,12 +170,9 @@ def make_pdf_to_png_converter():
170170
except:
171171
pass
172172
# check for ghostscript
173-
try:
174-
gs = "gs" if sys.platform != "win32" else "gswin32c"
175-
check_output([gs, "-v"], stderr=subprocess.STDOUT)
173+
gs, ver = mpl.checkdep_ghostscript()
174+
if gs:
176175
tools_available.append("gs")
177-
except:
178-
pass
179176

180177
# pick converter
181178
if "pdftocairo" in tools_available:

0 commit comments

Comments
 (0)