MySQLdb doesn't allow None to be passed for password

Bug #829019 reported by Rick Harris
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Medium
Rick Harris

Bug Description

Received this traceback: http://paste.openstack.org/show/2209/

The root cause seems to be that SQLAlchemy's `make_url` will return None if the password isn't present. When we try to pass this `None` value to the MySQLdb driver, it complains since it's expecting a string.

The fix here is to do something like:

connection_dict.password or ''

After testing that out, it seems to fix the problem.

Notes:

>>> MySQLdb.__version__
'1.2.2'

Related branches

Changed in nova:
assignee: nobody → Rick Harris (rconradharris)
importance: Undecided → Medium
status: New → In Progress
Changed in nova:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in nova:
milestone: none → diablo-4
Thierry Carrez (ttx)
Changed in nova:
milestone: diablo-4 → 2011.3
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.