mirror of
https://github.com/ansible-collections/community.mysql.git
synced 2025-04-23 10:51:25 -07:00
* Display a more informative error when InvalidPrivsError is raised (Issue #465) Co-authored-by: Laurent Indermühle <laurent.indermuehle@pm.me>
This commit is contained in:
parent
4dac66382a
commit
6ac89ca1f6
8 changed files with 62 additions and 1 deletions
|
@ -725,7 +725,8 @@ 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 , params: %s, query: %s ,"
|
||||
" exception: %s." % (priv_string, str(params), query, str(e)))
|
||||
|
||||
|
||||
def convert_priv_dict_to_str(priv):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue