changeset 34:463dc92867df

commitwatcher/event.py
author Jeff Hammel <jhammel@mozilla.com>
date Sun, 13 Oct 2013 19:17:34 -0700
parents 9a76064ea527
children 5406eb70f5bd
files commitwatcher/event.py
diffstat 1 files changed, 9 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/commitwatcher/event.py	Sun Oct 13 19:08:46 2013 -0700
+++ b/commitwatcher/event.py	Sun Oct 13 19:17:34 2013 -0700
@@ -2,8 +2,17 @@
 event system for watching commits
 """
 
+from abc import abstractmethod
+
 class EventHandler(object):
     """ABC for events"""
 
+    def match(self, commit):
+        """does this event trigger the handler?"""
+        return True  # abstractmethod
+
 class PathEventHandler(EventHandler):
     """events based on paths"""
+
+    def match(self, commit):
+    pass # TODO: move path handling -> commit object