Commit 2c36c17a authored by Lukas Fleischer's avatar Lukas Fleischer
Browse files

db.py: Support pyformat paramstyle



This is used by the MySQL database backend.
Signed-off-by: Lukas Fleischer's avatarLukas Fleischer <lfleischer@archlinux.org>
parent 4a355c71
......@@ -32,7 +32,7 @@ class Connection:
raise ValueError('unsupported database backend')
def execute(self, query, params=()):
if self._paramstyle == 'format':
if self._paramstyle in ('format', 'pyformat'):
query = query.replace('%', '%%').replace('?', '%s')
elif self._paramstyle == 'qmark':
pass
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment