summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLukas Fleischer <lfleischer@archlinux.org>2016-08-14 21:56:41 +0200
committerLukas Fleischer <lfleischer@archlinux.org>2016-08-14 21:56:45 +0200
commit2c36c17a18b0d7b54072cb85898b2795567fbf99 (patch)
tree08f93541dc6e0cc0cf8f40107b056d3e960dca89
parent4a355c71cb21d21db2d7d6dec5746a432e47aaea (diff)
downloadaur-2c36c17a18b0d7b54072cb85898b2795567fbf99.tar.gz
aur-2c36c17a18b0d7b54072cb85898b2795567fbf99.tar.xz
db.py: Support pyformat paramstyle
This is used by the MySQL database backend. Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
-rw-r--r--git-interface/db.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/git-interface/db.py b/git-interface/db.py
index 060689b1..75d2283d 100644
--- a/git-interface/db.py
+++ b/git-interface/db.py
@@ -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