diff --git a/src/PIL/ImageFile.py b/src/PIL/ImageFile.py index 43d2bf0cc..2a7febb2b 100644 --- a/src/PIL/ImageFile.py +++ b/src/PIL/ImageFile.py @@ -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 # a tricky case. 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: fh = fp.fileno() fp.flush()