Removed re-raising of exception

This commit is contained in:
Andrew Murray 2022-03-04 12:13:08 +11:00
parent cb4e26783f
commit 3426052874

View File

@ -109,13 +109,7 @@ class PpmImageFile(ImageFile.ImageFile):
self.mode = rawmode = mode
for ix in range(3):
token = self._read_token()
try: # check token sanity
token = int(token)
except ValueError:
raise ValueError(
f"Non-decimal-ASCII found in header: {token}"
) from None
token = int(self._read_token())
if ix == 0: # token is the x size
xsize = token
elif ix == 1: # token is the y size