]> git.ipfire.org Git - collecty.git/commitdiff
plugin: Pass kwargs to custom init method.
authorMichael Tremer <michael.tremer@ipfire.org>
Sat, 25 Aug 2012 15:37:50 +0000 (15:37 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Sat, 25 Aug 2012 15:37:50 +0000 (15:37 +0000)
collecty/plugins/base.py

index 76ac1ccd3c602a6e14726377dc4b3f94da509ffe..1ccf2f58fcb099a6640a0d191806f3ba6f16cc60 100644 (file)
@@ -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.
                """