Skip to content

Commit

Permalink
Add warning
Browse files Browse the repository at this point in the history
  • Loading branch information
WenzDaniel committed Nov 20, 2023
1 parent 672dacb commit 62c5f8e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion strax/context.py
Expand Up @@ -340,10 +340,13 @@ def register(self, plugin_class):
# If we booted a plugin from a datatype, we must boot it from other
# datatypes it makes too, to preserve a one-to-one mapping between
# datatypes and registered plugins.
for old_plugin in deregistered:
for old_plugin in set(deregistered):
for d in old_plugin.provides:
currently_registered = self._plugin_class_registry.get(d)
if old_plugin == currently_registered:
# Must be equal here, because we are only looking for the remanants which were
# not overwritten above.
warnings.warn(f'Provides of multi-output plugins overlap dregister plugin {old_plugin}.')
del self._plugin_class_registry[d]

already_seen = []
Expand Down

0 comments on commit 62c5f8e

Please sign in to comment.