Browse Source

Added ability to clear the event handlers.

pyserial_fix
Scott Petersen 7 years ago
parent
commit
ffc6d5efdf
1 changed files with 4 additions and 0 deletions
  1. +4
    -0
      alarmdecoder/event/event.py

+ 4
- 0
alarmdecoder/event/event.py View File

@@ -65,6 +65,10 @@ class EventHandler(object):
self._getfunctionlist().remove(func)
return self

def clear(self):
del self._getfunctionlist()[:]
return self

def fire(self, *args, **kwargs):

"""Fire event and call all handler functions


Loading…
Cancel
Save