Decode fetch results before making string comparisons

This commit is contained in:
Erik Johnson 2018-12-11 13:58:15 -06:00
parent e31e731697
commit ec8e116f7e
No known key found for this signature in database
GPG key ID: 5E5583C437808F3F

View file

@ -1778,7 +1778,7 @@ def user_grants(user,
return False
ret = []
results = cur.fetchall()
results = salt.utils.data.decode(cur.fetchall())
for grant in results:
tmp = grant[0].split(' IDENTIFIED BY')[0]
if 'WITH GRANT OPTION' in grant[0] and 'WITH GRANT OPTION' not in tmp: