[Python-modules-team] Bug#678169: more information

Neil Wallace rowinggolfer at gmail.com
Tue Jun 19 22:15:27 UTC 2012


ok.. I looked into the code which connects.

this code used to work.

>>> import MySQLdb
>>> conn = MySQLdb.Connect(user="foo", passwd="********", db="bar", ssl={'ca': '/etc/mysql/ca-cert.pem'})

so did this.(the same, but with an empty dictionary passed as ssl params)

>>> import MySQLdb
>>> conn = MySQLdb.Connect(user="foo", passwd="********", db="bar", db="openmolar", ssl={})

now, my only option is this
>>> import MySQLdb
>>> conn = MySQLdb.Connect(user="foo", passwd="********", db="bar")


hope this helps classify the bug, it probably isn't as important as I
first thought, but IS a change in behaviour.

If you are wondering why bother with the empty dict... here's why:
in the application itself, the following code exists.

>>> ssl_settings = {'ca': '/etc/mysql/ca-cert.pem'} if conf_file.ssl else {}
>>> conn = MySQLdb.connect(host = my_host, port = my_port, user = my_user, passwd = my_password, db = my_db, ssl = ssl_settings)





More information about the Python-modules-team mailing list