mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-07-10 16:22:22 +03:00
Use maxsplit
This commit is contained in:
parent
33ce0140fb
commit
e1cd9ad5ac
|
@ -45,7 +45,7 @@ class GimpPaletteFile:
|
||||||
msg = "bad palette file"
|
msg = "bad palette file"
|
||||||
raise SyntaxError(msg)
|
raise SyntaxError(msg)
|
||||||
|
|
||||||
v = tuple(map(int, s.split()[:3]))
|
v = tuple(map(int, s.split(maxsplit=3)[:3]))
|
||||||
if len(v) != 3:
|
if len(v) != 3:
|
||||||
msg = "bad palette entry"
|
msg = "bad palette entry"
|
||||||
raise ValueError(msg)
|
raise ValueError(msg)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user