Skip to content

Commit

Permalink
Display a more informative error when InvalidPrivsError is raised (an…
Browse files Browse the repository at this point in the history
  • Loading branch information
bizmate committed Nov 10, 2022
1 parent 09e0232 commit d95435e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion plugins/module_utils/user.py
Original file line number Diff line number Diff line change
Expand Up @@ -725,7 +725,7 @@ def privileges_grant(cursor, user, host, db_table, priv, tls_requires, maria_rol
try:
cursor.execute(query, params)
except (mysql_driver.ProgrammingError, mysql_driver.OperationalError, mysql_driver.InternalError) as e:
raise InvalidPrivsError("Error granting privileges, invalid priv string: %s" % priv_string)
raise InvalidPrivsError("Error granting privileges, invalid priv string: %s , query: %s , exception: %s." % (priv_string, query, str(e)) )


def convert_priv_dict_to_str(priv):
Expand Down

0 comments on commit d95435e

Please sign in to comment.