Fix saving EPS to open file objects on Python 2.x

Fix issue #470 and #479
This commit is contained in:
cgohlke 2014-01-11 15:04:01 -08:00 committed by wiredfool
parent e1489d7c76
commit 4446f05ac0

View File

@ -350,7 +350,9 @@ def _save(im, fp, filename, eps=1):
pass
base_fp = fp
fp = io.TextIOWrapper(NoCloseStream(fp), encoding='latin-1')
fp = NoCloseStream(fp)
if sys.version_info[0] > 2:
fp = io.TextIOWrapper(fp, encoding='latin-1')
if eps:
#