Skip to content

Commit e1cd9ad

Browse files
committed
Use maxsplit
1 parent 33ce014 commit e1cd9ad

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/PIL/GimpPaletteFile.py

Lines changed: 1 addition & 1 deletion
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)