mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-07-03 19:33:07 +03:00
Removed re-raising of exception
This commit is contained in:
parent
cb4e26783f
commit
3426052874
|
@ -109,13 +109,7 @@ class PpmImageFile(ImageFile.ImageFile):
|
||||||
self.mode = rawmode = mode
|
self.mode = rawmode = mode
|
||||||
|
|
||||||
for ix in range(3):
|
for ix in range(3):
|
||||||
token = self._read_token()
|
token = int(self._read_token())
|
||||||
try: # check token sanity
|
|
||||||
token = int(token)
|
|
||||||
except ValueError:
|
|
||||||
raise ValueError(
|
|
||||||
f"Non-decimal-ASCII found in header: {token}"
|
|
||||||
) from None
|
|
||||||
if ix == 0: # token is the x size
|
if ix == 0: # token is the x size
|
||||||
xsize = token
|
xsize = token
|
||||||
elif ix == 1: # token is the y size
|
elif ix == 1: # token is the y size
|
||||||
|
|
Loading…
Reference in New Issue
Block a user