Skip to content

Commit

Permalink
Fix ps distillation (mpl helpers take strs, not Paths).
Browse files Browse the repository at this point in the history
  • Loading branch information
anntzer committed Mar 12, 2020
1 parent e7e75d1 commit bdcfb89
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/mplcairo/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -301,8 +301,8 @@ def _print_ps_impl(self, is_eps, path_or_stream, *,
{"ghostscript": backend_ps.gs_distill,
"xpdf": backend_ps.xpdf_distill}[
mpl.rcParams["ps.usedistiller"]](
tmp_name, False, ptype=papertype)
with open(tmp_name, "rb") as tmp_file, \
str(tmp_name), False, ptype=papertype)
with tmp_name.open("rb") as tmp_file, \
cbook.open_file_cm(path_or_stream, "wb") as stream:
shutil.copyfileobj(tmp_file, stream)
else:
Expand Down

0 comments on commit bdcfb89

Please sign in to comment.