From 286f9e194923f8fb98859b114d17b64206d84459 Mon Sep 17 00:00:00 2001 From: jan Date: Mon, 9 Mar 2026 01:41:57 -0700 Subject: [PATCH] [read_properties] skip unrecognized tags --- klamath/elements.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/klamath/elements.py b/klamath/elements.py index 9a12b7d..c0d5567 100644 --- a/klamath/elements.py +++ b/klamath/elements.py @@ -2,6 +2,7 @@ Functionality for reading/writing elements (geometry, text labels, structure references) and associated properties. """ +import io from typing import IO, TypeVar from collections.abc import Mapping from abc import ABCMeta, abstractmethod @@ -53,6 +54,8 @@ def read_properties(stream: IO[bytes]) -> dict[int, bytes]: if key in properties: raise KlamathError(f'Duplicate property key: {key!r}') properties[key] = value + else: + stream.seek(size, io.SEEK_CUR) size, tag = Record.read_header(stream) return properties