diff --git a/src/dynamic_graph/entity.py b/src/dynamic_graph/entity.py index 6830bea38b400beeb9fecf81c00d53f74d64222d..6c8e828d7885b5b3c1528b69af920fb4bc4ee9ea 100644 --- a/src/dynamic_graph/entity.py +++ b/src/dynamic_graph/entity.py @@ -145,6 +145,12 @@ class Entity (object) : except: object.__getattr__(self, name) + def __setattr__(self, name, value): + if name in map(lambda s: s.getName().split(':')[-1],self.signals()): + raise NameError(name+" already designates a signal. " + "It is not advised to set a new attribute of the same name.") + object.__setattr__(self, name, value) + # --- COMMANDS BINDER ----------------------------------------------------- # List of all the entity classes from the c++ factory, that have been bound # bind the py factory.