From: Javier Sancho Date: Thu, 13 Mar 2014 15:31:53 +0000 (+0100) Subject: Default values for user and password in MySQL connections must be empty X-Git-Url: https://git.jsancho.org/?p=mojodb.git;a=commitdiff_plain;h=50430eeab5d7e3c1fbb3a130f2d26dc28d5f45da Default values for user and password in MySQL connections must be empty strings, not None --- diff --git a/MySQL.py b/MySQL.py index 98365b4..ba00c33 100644 --- a/MySQL.py +++ b/MySQL.py @@ -84,7 +84,7 @@ class Connection(connection.Connection): Constraint = Constraint Literal = Literal - def __init__(self, host="localhost", user=None, passwd=None, *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)