Skip to content

Commit

Permalink
In topic_info.py, convert the exception into a warning when data arra…
Browse files Browse the repository at this point in the history
…ys lenght are different than the one defined in the xml.
  • Loading branch information
tribeiro committed Dec 13, 2024
1 parent 894c27f commit eb32c0b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions python/lsst/ts/xml/topic_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
import hashlib
import json
import typing
import warnings
from xml.etree import ElementTree

from .field_info import FieldInfo
Expand Down Expand Up @@ -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(
Expand Down

0 comments on commit eb32c0b

Please sign in to comment.