From 8bef3359fb27b63cf608a6685a99ed77fa766e5a Mon Sep 17 00:00:00 2001 From: Guillaume Bandet Date: Tue, 5 Nov 2013 11:01:22 +0100 Subject: Syntax fix for python 2.5 support. --- MySQLdb/cursors.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/MySQLdb/cursors.py b/MySQLdb/cursors.py index 8815b80..9797d4a 100644 --- a/MySQLdb/cursors.py +++ b/MySQLdb/cursors.py @@ -181,7 +181,8 @@ class BaseCursor(object): query = query.encode(db.unicode_literal.charset) if args is not None: if isinstance(args, dict): - query = query % {key: db.literal(item) for key, item in args.iteritems()} + query = query % dict((key, db.literal(item)) + for key, item in args.iteritems()) else: query = query % tuple([db.literal(item) for item in args]) try: -- cgit v1.2.1