Suppress exception context

This commit is contained in:
Piolie 2021-01-06 14:46:30 -03:00
parent 002e0bd697
commit 73fed77c0c

View File

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