From 8d9a469ae2c289d2fde46c64d6d6d37e27dc9520 Mon Sep 17 00:00:00 2001 From: Kaalleen <36401965+kaalleen@users.noreply.github.com> Date: Mon, 4 Jul 2022 13:13:05 +0200 Subject: Ignore invalid palettes (#1718) --- lib/threads/palette.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'lib/threads/palette.py') diff --git a/lib/threads/palette.py b/lib/threads/palette.py index 7a6bf153..e0e3a0ab 100644 --- a/lib/threads/palette.py +++ b/lib/threads/palette.py @@ -40,8 +40,11 @@ class ThreadPalette(Set): with open(palette_file, encoding='utf8') as palette: line = palette.readline().strip() + + self.is_gimp_palette = True if line.lower() != "gimp palette": - raise ValueError("Invalid gimp palette header") + self.is_gimp_palette = False + return self.name = palette.readline().strip() if self.name.lower().startswith('name: ink/stitch: '): -- cgit v1.2.3