Skip to content

Commit

Permalink
Syntax fix for python 2.5 support.
Browse files Browse the repository at this point in the history
  • Loading branch information
gbandet committed Nov 5, 2013
1 parent 87d1145 commit 8bef335
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion MySQLdb/cursors.py
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,8 @@ def execute(self, query, args=None):
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:
Expand Down

0 comments on commit 8bef335

Please sign in to comment.