# HG changeset patch # User Paul Boddie # Date 1414266264 -7200 # Node ID 1dbe146491d307f9f7cc795837631a5943ff4636 # Parent 4e8cbf5e400f6269324b67c0240ae3f8da91f37f Introduced an abstract handler to ensure the availability of a common method. diff -r 4e8cbf5e400f -r 1dbe146491d3 imiptools/handlers/person.py --- a/imiptools/handlers/person.py Sat Oct 25 21:43:45 2014 +0200 +++ b/imiptools/handlers/person.py Sat Oct 25 21:44:24 2014 +0200 @@ -8,9 +8,9 @@ from imiptools.content import Handler, to_part from vCalendar import to_node -class Event(Handler): +class PersonHandler(Handler): - "An event handler." + "Handling mechanisms specific to people." def _record_and_deliver(self, queue=False): @@ -38,6 +38,10 @@ return True +class Event(PersonHandler): + + "An event handler." + def add(self): # NOTE: Queue a suggested modification to any active event. @@ -106,7 +110,7 @@ return "REQUEST", MIMEText("A request has been queued.") -class Freebusy(Handler): +class Freebusy(PersonHandler): "A free/busy handler." @@ -171,7 +175,7 @@ return "REPLY", to_part("REPLY", calendar) -class Journal(Handler): +class Journal(PersonHandler): "A journal entry handler." @@ -199,7 +203,7 @@ return "PUBLISH", MIMEText("Details of a journal entry have been received.") -class Todo(Handler): +class Todo(PersonHandler): "A to-do item handler."