mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-12-28 02:46:18 +03:00
Removed re-raising of exception
This commit is contained in:
parent
9e04416c6c
commit
4fcef0d163
|
@ -250,12 +250,7 @@ class PpmPlainDecoder(ImageFile.PyDecoder):
|
||||||
raise ValueError(
|
raise ValueError(
|
||||||
f"Token too long found in data: {token[:max_len + 1]}"
|
f"Token too long found in data: {token[:max_len + 1]}"
|
||||||
)
|
)
|
||||||
try:
|
token = int(token)
|
||||||
token = int(token)
|
|
||||||
except ValueError:
|
|
||||||
raise ValueError(
|
|
||||||
f"Non-decimal-ASCII found in data: {token}"
|
|
||||||
) from None
|
|
||||||
tokens_read += 1
|
tokens_read += 1
|
||||||
if token > maxval:
|
if token > maxval:
|
||||||
raise ValueError(f"Channel value too large for this mode: {token}")
|
raise ValueError(f"Channel value too large for this mode: {token}")
|
||||||
|
|
Loading…
Reference in New Issue
Block a user