Merge branch 'issue_15195' of https://github.com/cachedout/salt into cachedout-issue_15195

This commit is contained in:
Thomas S Hatch 2014-10-01 15:03:01 -06:00
commit 0340e41ccf

View File

@ -280,6 +280,9 @@ def _connect(**kwargs):
# Ensure MySQldb knows the format we use for queries with arguments
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:
dbc = MySQLdb.connect(**connargs)
except MySQLdb.OperationalError as exc: