mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-11-11 20:27:06 +03:00
Remove stdout check in ImageFile._save
This commit is contained in:
parent
953b57510f
commit
f55ccd9563
|
@ -493,13 +493,6 @@ def _save(im, fp, tile, bufsize=0):
|
||||||
# But, it would need at least the image size in most cases. RawEncode is
|
# But, it would need at least the image size in most cases. RawEncode is
|
||||||
# a tricky case.
|
# a tricky case.
|
||||||
bufsize = max(MAXBLOCK, bufsize, im.size[0] * 4) # see RawEncode.c
|
bufsize = max(MAXBLOCK, bufsize, im.size[0] * 4) # see RawEncode.c
|
||||||
try:
|
|
||||||
stdout = fp == sys.stdout or fp == sys.stdout.buffer
|
|
||||||
except (OSError, AttributeError):
|
|
||||||
stdout = False
|
|
||||||
if stdout:
|
|
||||||
fp.flush()
|
|
||||||
return
|
|
||||||
try:
|
try:
|
||||||
fh = fp.fileno()
|
fh = fp.fileno()
|
||||||
fp.flush()
|
fp.flush()
|
||||||
|
|
Loading…
Reference in New Issue
Block a user