]> git.jsancho.org Git - mojodb.git/blobdiff - MySQL.py
Some tests
[mojodb.git] / MySQL.py
index e983a670fa957f2d082f21b6c41a729512a05716..ba00c333349485a6fd7d2549826d1e7cc5654734 100644 (file)
--- a/MySQL.py
+++ b/MySQL.py
@@ -84,9 +84,10 @@ class Connection(connection.Connection):
     Constraint = Constraint
     Literal = Literal
 
-    def __init__(self, *args, **kwargs):
-        self._db_con = MySQLdb.connect(*args, **kwargs)
-        self._db_con_autocommit = MySQLdb.connect(*args, **kwargs)
+    def __init__(self, host="localhost", user="", passwd="", *args, **kwargs):
+        self._db_con = MySQLdb.connect(host=host, user=user, passwd=passwd)
+        self._db_con_autocommit = MySQLdb.connect(host=host, user=user, passwd=passwd)
+        super(Connection, self).__init__(*args, **kwargs)
 
     def query(self, sql, db=None):
         if db is None: