mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-03-13 09:15:46 +03:00
Use maxsplit
This commit is contained in:
parent
5ba72a9b54
commit
237aea414f
|
@ -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