From: Michael Tremer Date: Sat, 25 Aug 2012 15:37:50 +0000 (+0000) Subject: plugin: Pass kwargs to custom init method. X-Git-Tag: 0.0.2~14 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=269f74cd9fa711e0908424bd315f08662280e8e8;p=collecty.git plugin: Pass kwargs to custom init method. --- diff --git a/collecty/plugins/base.py b/collecty/plugins/base.py index 76ac1cc..1ccf2f5 100644 --- a/collecty/plugins/base.py +++ b/collecty/plugins/base.py @@ -92,12 +92,12 @@ class Plugin(threading.Thread): self.data = [] + # Run some custom initialization. + self.init(**kwargs) + # Create the database file. self.create() - # Run some custom initialization. - self.init() - # Keepalive options self.running = True self.timer = Timer(self.interval) @@ -156,7 +156,7 @@ class Plugin(threading.Thread): ### Basic methods - def init(self): + def init(self, **kwargs): """ Do some custom initialization stuff here. """