From 925a27ce8f9641e9b1cf5e596a6c12cd13855686 Mon Sep 17 00:00:00 2001 From: Benedikt Lorch Date: Sun, 19 Nov 2023 13:23:11 +0100 Subject: [PATCH] Revert previous commit --- src/jpeglib/_bind.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/jpeglib/_bind.py b/src/jpeglib/_bind.py index b8d5891..7d353f2 100644 --- a/src/jpeglib/_bind.py +++ b/src/jpeglib/_bind.py @@ -155,7 +155,6 @@ def read_jpeg_spatial( if path is None: path = srcfile - flag_mask = cls.flags_to_mask(flags) status = cls.get().read_jpeg_spatial( cls.cstr(srcfile), spatial, @@ -164,9 +163,9 @@ def read_jpeg_spatial( out_color_space, dither_mode, dct_method, - flag_mask + cls.flags_to_mask(flags) ) - + if status == 0: raise IOError(f"reading of {path} spatial failed")