Skip to content

Commit d7f3190

Browse files
committed
Fix ps backend from 2to3->six changes
1 parent 9310a2b commit d7f3190

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

lib/matplotlib/backends/backend_ps.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1165,7 +1165,10 @@ def print_figure_impl():
11651165
print("%s clipbox"%_nums_to_str(width*72, height*72, 0, 0), file=fh)
11661166

11671167
# write the figure
1168-
print(self._pswriter.getvalue(), file=fh)
1168+
content = self._pswriter.getvalue()
1169+
if not isinstance(content, six.text_type):
1170+
content = content.decode('ascii')
1171+
print(content, file=fh)
11691172

11701173
# write the trailer
11711174
#print >>fh, "grestore"

0 commit comments

Comments
 (0)