fix format strings

This commit is contained in:
Jan Dittberner 2015-01-01 22:54:57 +01:00
parent ff83795916
commit 4ed81c29e6
1 changed files with 4 additions and 4 deletions

View File

@ -39,7 +39,7 @@ def create_mysql_user(username, password):
curs = conn.cursor()
curs.execute(
"""
CREATE USER %(username)s@'%' IDENTIFIED BY %(password)s
CREATE USER %(username)s@'%%' IDENTIFIED BY %(password)s
""",
{'username': username, 'password': password}
)
@ -83,7 +83,7 @@ def delete_mysql_user(username):
curs = conn.cursor()
curs.execute(
"""
DROP USER %(username)s@'%'
DROP USER %(username)s@'%%'
""",
{'username': username})
conn.commit()
@ -110,7 +110,7 @@ def create_mysql_database(dbname, username):
{'dbname': dbname})
curs.execute(
"""
GRANT ALL PRIVILEGES ON %(dbname)s.* TO %(username)s@'%'
GRANT ALL PRIVILEGES ON %(dbname)s.* TO %(username)s@'%%'
""",
{'dbname': dbname, 'username': username})
conn.commit()
@ -133,7 +133,7 @@ def delete_mysql_database(dbname, username):
curs = conn.cursor()
curs.execute(
"""
REVOKE ALL PRIVILEGES ON %(dbname)s.* FROM %(username)s@'%'
REVOKE ALL PRIVILEGES ON %(dbname)s.* FROM %(username)s@'%%'
""",
{'dbname': dbname, 'username': username})
conn.commit()