X-Git-Url: https://git.jsancho.org/?p=mojodb.git;a=blobdiff_plain;f=MySQL.py;fp=MySQL.py;h=98365b4d50d22629584ae39db071cd33cf8e7ae2;hp=e983a670fa957f2d082f21b6c41a729512a05716;hb=8893f5128b8e8790f186c8bf354a3bb721d69bcb;hpb=aa509ddc8574e0a5220c94a2b72f4d5a798d6e8a diff --git a/MySQL.py b/MySQL.py index e983a67..98365b4 100644 --- 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=None, passwd=None, *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: