From 4fcef0d1635bfc4f000005cb1d5df6b6f91c8007 Mon Sep 17 00:00:00 2001 From: Andrew Murray Date: Sat, 12 Mar 2022 17:44:32 +1100 Subject: [PATCH] Removed re-raising of exception --- src/PIL/PpmImagePlugin.py | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/PIL/PpmImagePlugin.py b/src/PIL/PpmImagePlugin.py index 0a71b6fb6..0f3cbcc4b 100644 --- a/src/PIL/PpmImagePlugin.py +++ b/src/PIL/PpmImagePlugin.py @@ -250,12 +250,7 @@ class PpmPlainDecoder(ImageFile.PyDecoder): raise ValueError( f"Token too long found in data: {token[:max_len + 1]}" ) - try: - token = int(token) - except ValueError: - raise ValueError( - f"Non-decimal-ASCII found in data: {token}" - ) from None + token = int(token) tokens_read += 1 if token > maxval: raise ValueError(f"Channel value too large for this mode: {token}")