summaryrefslogtreecommitdiffstats
path: root/module/plugins/hooks/Hook.py
diff options
context:
space:
mode:
authorGravatar mkaay <mkaay@mkaay.de> 2010-01-06 22:11:24 +0100
committerGravatar mkaay <mkaay@mkaay.de> 2010-01-06 22:11:24 +0100
commitd2aa3fceb9f896343b128d40f20a0465cf69efca (patch)
treea04d975938f19582b2afa2278107bd07e4c86ad4 /module/plugins/hooks/Hook.py
parentcli fix, webinterface db check (diff)
downloadpyload-d2aa3fceb9f896343b128d40f20a0465cf69efca.tar.xz
small fixes, new hook stuff
Diffstat (limited to 'module/plugins/hooks/Hook.py')
-rw-r--r--module/plugins/hooks/Hook.py16
1 files changed, 16 insertions, 0 deletions
diff --git a/module/plugins/hooks/Hook.py b/module/plugins/hooks/Hook.py
index f02432718..09b21ba49 100644
--- a/module/plugins/hooks/Hook.py
+++ b/module/plugins/hooks/Hook.py
@@ -19,10 +19,15 @@
"""
import logging
+from os.path import join
+
+from module.XMLConfigParser import XMLConfigParser
class Hook():
def __init__(self, core):
self.logger = logging.getLogger("log")
+ self.configParser = XMLConfigParser(join("module","config","plugin.xml"), join("module","config","plugin_default.xml"))
+ self.config = {}
props = {}
props['name'] = "Hook"
props['version'] = "0.1"
@@ -32,6 +37,17 @@ class Hook():
self.props = props
self.core = core
+ def readConfig(self):
+ self.configParser.loadData()
+ section = self.props['name']
+ try:
+ self.config = self.configParser.getConfig()[section]
+ except:
+ self.setup()
+
+ def setup(self):
+ pass
+
def downloadStarts(self, pyfile):
pass