From 01ffa260a44cc43412b9a284c80edf6a07db69ac Mon Sep 17 00:00:00 2001 From: Andres Vazquez Date: Tue, 10 Jun 2014 11:55:58 -0300 Subject: [PATCH] You need to support single strings as parameters --- MySQLdb/cursors.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/MySQLdb/cursors.py b/MySQLdb/cursors.py index 348a586a..f288e790 100644 --- a/MySQLdb/cursors.py +++ b/MySQLdb/cursors.py @@ -184,6 +184,8 @@ def execute(self, query, args=None): query = query % dict((key, db.literal(item)) for key, item in args.iteritems()) else: + if isinstance(args, basestring): + args = [args] query = query % tuple([db.literal(item) for item in args]) try: r = None