mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 17:33:54 +00:00
Merge branch 'issue_15195' of https://github.com/cachedout/salt into cachedout-issue_15195
This commit is contained in:
commit
0340e41ccf
@ -280,6 +280,9 @@ def _connect(**kwargs):
|
|||||||
# Ensure MySQldb knows the format we use for queries with arguments
|
# Ensure MySQldb knows the format we use for queries with arguments
|
||||||
MySQLdb.paramstyle = 'pyformat'
|
MySQLdb.paramstyle = 'pyformat'
|
||||||
|
|
||||||
|
if connargs.get('passwd', True) is None: # If present but set to None. (Extreme edge case.)
|
||||||
|
log.warning('MySQL password of None found. Attempting passwordless login.')
|
||||||
|
connargs.pop('passwd')
|
||||||
try:
|
try:
|
||||||
dbc = MySQLdb.connect(**connargs)
|
dbc = MySQLdb.connect(**connargs)
|
||||||
except MySQLdb.OperationalError as exc:
|
except MySQLdb.OperationalError as exc:
|
||||||
|
Loading…
Reference in New Issue
Block a user