abstract_device handler
@@ -175,9 +175,10 @@ class AbstractDevice(object):
"""
Registers handler to notify when device should be forgot.
- :param handler: callable with parameter device_name to call when device should be forgot.
+ :param handler: callable to call when device should be forgot.
:return: None
"""
+ if handler not in self._forget_handlers:
self._forget_handlers.append(handler)
def close_and_forget(self):
