Skip to content

Commit

Permalink
Removed re-raising of exception
Browse files Browse the repository at this point in the history
  • Loading branch information
radarhere committed Mar 12, 2022
1 parent 9e04416 commit 4fcef0d
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions src/PIL/PpmImagePlugin.py
Expand Up @@ -250,12 +250,7 @@ def _decode_blocks(self, channels=1, depth=8):
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}")
Expand Down

0 comments on commit 4fcef0d

Please sign in to comment.