Update src/PIL/GimpPaletteFile.py

Co-authored-by: Andrew Murray <3112309+radarhere@users.noreply.github.com>
This commit is contained in:
Joao S. O. Bueno 2022-10-07 01:22:32 -03:00 committed by GitHub
parent 0d00d08b15
commit 2eb6976590
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -58,7 +58,7 @@ class GimpPaletteFile:
raise SyntaxError("bad palette file")
# 4th column is color name and may contain spaces.
v = s.split(None, 4)
v = s.split(maxsplit=3)
if len(v) < 3:
raise ValueError("bad palette entry")
for i in range(3):