[aur-dev] [PATCH] db.py: Support pyformat paramstyle

Lukas Fleischer lfleischer at archlinux.org
Sun Aug 14 19:59:35 UTC 2016


This is used by the MySQL database backend.

Signed-off-by: Lukas Fleischer <lfleischer at archlinux.org>
---
 git-interface/db.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/git-interface/db.py b/git-interface/db.py
index 060689b..75d2283 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
-- 
2.9.2


More information about the aur-dev mailing list