From 188a97fc20c3e24950b82dc6fcd0da878509cf7a Mon Sep 17 00:00:00 2001 From: Maximilian Meister Date: Thu, 5 Apr 2018 13:23:23 +0200 Subject: [PATCH] fall back to PyMySQL same is already done in modules (see #26803) Signed-off-by: Maximilian Meister --- salt/modules/mysql.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/salt/modules/mysql.py b/salt/modules/mysql.py index fdfe35158a..385e4d92a3 100644 --- a/salt/modules/mysql.py +++ b/salt/modules/mysql.py @@ -55,7 +55,7 @@ try: import MySQLdb.cursors import MySQLdb.converters from MySQLdb.constants import FIELD_TYPE, FLAG - from MySQLdb import OperationalError + from MySQLdb.connections import OperationalError except ImportError: try: # MySQLdb import failed, try to import PyMySQL @@ -66,7 +66,7 @@ except ImportError: import MySQLdb.cursors import MySQLdb.converters from MySQLdb.constants import FIELD_TYPE, FLAG - from MySQLdb import OperationalError + from MySQLdb.err import OperationalError except ImportError: MySQLdb = None -- 2.29.2