Add shortcut to database instance from Event class.
authorMichael Tremer <michael.tremer@ipfire.org>
Thu, 29 Apr 2010 14:52:20 +0000 (16:52 +0200)
committerMichael Tremer <michael.tremer@ipfire.org>
Thu, 29 Apr 2010 14:52:20 +0000 (16:52 +0200)
cappie/events.py

index 391e90b..edb6051 100644 (file)
@@ -30,6 +30,7 @@ class Event(object):
                self.cappie = interface.cappie
                self.interface = interface
                self.log = interface.log
+               self.db = self.cappie.db
 
        def __str__(self):
                return self.__class__.__name__