Fix for "AttributeError: 'module' object has no attribute 'cursors'" (#49191) (#53445)

* Fix for "AttributeError: 'module' object has no attribute 'cursors'" (#49191) (#1)

* Fix for "AttributeError: 'module' object has no attribute 'cursors'" (#49191)

* Adding changelog fragment for issue #49191 and the following PR.

* Update lib/ansible/module_utils/mysql.py

Co-Authored-By: timorunge <timorunge@users.noreply.github.com>
pull/53514/head
Timo Runge 6 years ago committed by John R Barker
parent 36baf7d83a
commit b45b599433

@ -0,0 +1,2 @@
bugfixes:
- mysql - MySQLdb doesn't import the cursors module for its own purposes so it has to be imported in MySQL module utilities before it can be used in dependent modules like the proxysql module family.

@ -35,6 +35,7 @@ try:
except ImportError:
try:
import MySQLdb as mysql_driver
import MySQLdb.cursors
_mysql_cursor_param = 'cursorclass'
except ImportError:
mysql_driver = None

Loading…
Cancel
Save