From eb32c0b68009c4f83a1f819bbe951c4e2ff92029 Mon Sep 17 00:00:00 2001 From: Tiago Ribeiro Date: Fri, 13 Dec 2024 15:46:47 -0700 Subject: [PATCH] In topic_info.py, convert the exception into a warning when data arrays lenght are different than the one defined in the xml. --- python/lsst/ts/xml/topic_info.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/python/lsst/ts/xml/topic_info.py b/python/lsst/ts/xml/topic_info.py index 28ee30123..c6c1532d5 100644 --- a/python/lsst/ts/xml/topic_info.py +++ b/python/lsst/ts/xml/topic_info.py @@ -27,6 +27,7 @@ import hashlib import json import typing +import warnings from xml.etree import ElementTree from .field_info import FieldInfo @@ -368,8 +369,9 @@ def validate( if len(getattr(model, field_name)) != array_fields[field_name] ] if bad_arrays: - raise ValueError( - f"Array fields with incorrect length: {bad_arrays}" + warnings.warn( + f"Array fields with incorrect length: {bad_arrays}. " + "This used to be an error condition in past versions of salobj." ) dataclass = dataclasses.make_dataclass(