Fix: compatibility with python2

This commit is contained in:
R.Sicart 2021-11-08 15:14:27 +01:00 committed by R. Sicart
parent c8d93c796f
commit 68aa14feaf

View file

@ -647,7 +647,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) from e raise InvalidPrivsError("Error granting privileges, invalid priv string: %s" % priv_string)
def convert_priv_dict_to_str(priv): def convert_priv_dict_to_str(priv):