From c8c708f852dacea1c3014b62885251ac8fdcdabe Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Wed, 21 May 2025 15:15:57 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- Tests/oss-fuzz/fuzz_exif.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Tests/oss-fuzz/fuzz_exif.py b/Tests/oss-fuzz/fuzz_exif.py index 7db804620..751340b29 100644 --- a/Tests/oss-fuzz/fuzz_exif.py +++ b/Tests/oss-fuzz/fuzz_exif.py @@ -30,11 +30,11 @@ with instrument_imports(): def TestOneInput(data): if len(data) < 10: # Skip inputs that are too small return - + try: # Create a BytesIO object from the fuzzer data image_io = io.BytesIO(data) - + # Try to open the image with Image.open(image_io) as img: # Test EXIF extraction @@ -45,7 +45,7 @@ def TestOneInput(data): for tag_id, value in exif.items(): # Try to get the tag name tag_name = ExifTags.TAGS.get(tag_id, tag_id) - + # Try to convert GPS info if tag_id == 34853: # GPSInfo tag for gps_tag, gps_value in value.items(): @@ -53,7 +53,7 @@ def TestOneInput(data): except Exception: # Catch exceptions from EXIF processing pass - + # Test thumbnail extraction from EXIF try: if hasattr(img, 'getexif'): @@ -69,7 +69,7 @@ def TestOneInput(data): except Exception: # Catch exceptions from thumbnail extraction pass - + except Exception: # Catch all other exceptions pass