Skip to content

Commit 237aea4

Browse files
committed
Use maxsplit
1 parent 5ba72a9 commit 237aea4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/PIL/GimpPaletteFile.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ def __init__(self, fp: IO[bytes]) -> None:
4545
msg = "bad palette file"
4646
raise SyntaxError(msg)
4747

48-
v = tuple(map(int, s.split()[:3]))
48+
v = tuple(map(int, s.split(maxsplit=3)[:3]))
4949
if len(v) != 3:
5050
msg = "bad palette entry"
5151
raise ValueError(msg)

0 commit comments

Comments
 (0)