mirror of
https://github.com/ansible-collections/community.mysql.git
synced 2025-08-03 12:44:25 -07:00
Display a more informative error when InvalidPrivsError is raised (#465)
This commit is contained in:
parent
09e02320fd
commit
d95435e351
1 changed files with 1 additions and 1 deletions
|
@ -725,7 +725,7 @@ def privileges_grant(cursor, user, host, db_table, priv, tls_requires, maria_rol
|
||||||
try:
|
try:
|
||||||
cursor.execute(query, params)
|
cursor.execute(query, params)
|
||||||
except (mysql_driver.ProgrammingError, mysql_driver.OperationalError, mysql_driver.InternalError) as e:
|
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):
|
def convert_priv_dict_to_str(priv):
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue