Skip to content

Commit e018356

Browse files
committed
Warn on duplicate processor registration
Change `register_processor` to log a warning instead of raising on duplicate `PROCESSOR_ID` keys, allowing later registrations to override earlier ones without import-time failures. Update subclass save tests to load processor classes from `dlclivegui.processors.examples` via a dedicated fixture, so the parametrized tests validate the concrete example processors against the correct module data path.
1 parent e69f834 commit e018356

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

‎dlclivegui/processors/dlc_processor_socket.py‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,11 @@
3434
def register_processor(cls):
3535
registry_key = getattr(cls, "PROCESSOR_ID", cls.__name__)
3636
if registry_key in PROCESSOR_REGISTRY:
37-
raise ValueError(
37+
msg = (
3838
f"Duplicate processor registration key '{registry_key}': "
3939
f"{PROCESSOR_REGISTRY[registry_key].__name__} vs {cls.__name__}"
4040
)
41+
logger.warning(msg)
4142
PROCESSOR_REGISTRY[registry_key] = cls
4243
return cls
4344

0 commit comments

Comments
 (0)