summaryrefslogtreecommitdiffstats
path: root/modules/mysql.py
diff options
context:
space:
mode:
Diffstat (limited to 'modules/mysql.py')
-rw-r--r--modules/mysql.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/modules/mysql.py b/modules/mysql.py
new file mode 100644
index 0000000..3b6c3b1
--- /dev/null
+++ b/modules/mysql.py
@@ -0,0 +1,10 @@
+from base import ModuleBase
+import MySQLdb
+
+class Module(ModuleBase):
+ def __init__(self, manager):
+ ModuleBase.__init__(self, manager)
+
+ conf = manager.config['mysql']
+
+ self.db = MySQLdb.connect(host = conf['host'], user = conf['user'], passwd = conf['passwd'], db = conf['db'])