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