summaryrefslogtreecommitdiffstats
path: root/module/plugins
diff options
context:
space:
mode:
authorGravatar mkaay <mkaay@mkaay.de> 2010-01-09 22:22:07 +0100
committerGravatar mkaay <mkaay@mkaay.de> 2010-01-09 22:22:07 +0100
commit5274c296dc13cf91df804a537b8e2109d62b3d98 (patch)
tree03ddfc4139dfd61958416ab9ffecdddafecb2231 /module/plugins
parentHooks Config Incomplete (diff)
downloadpyload-5274c296dc13cf91df804a537b8e2109d62b3d98.tar.xz
better hook config
Diffstat (limited to 'module/plugins')
-rw-r--r--module/plugins/hooks/Hook.py14
1 files changed, 9 insertions, 5 deletions
diff --git a/module/plugins/hooks/Hook.py b/module/plugins/hooks/Hook.py
index 4b5f6751f..1a7fba092 100644
--- a/module/plugins/hooks/Hook.py
+++ b/module/plugins/hooks/Hook.py
@@ -40,13 +40,17 @@ class Hook():
def readConfig(self):
self.configParser.loadData()
section = self.props['name']
- #~ try:
- #~ self.config = self.configParser.getConfig()[section]
- #~ except:
- #~ self.setup()
+ try:
+ self.config = self.configParser.getConfig()[section]
+ except:
+ self.setup()
def setup(self):
- pass
+ self.configParser.set(self.props["name"], {"option": "activated", "type": "bool", "name": "Activated"}, True)
+ self.readConfig()
+
+ def isActivated(self):
+ return self.config["activated"]
def downloadStarts(self, pyfile):
pass