From 589521e027fa4c6f5497de5351a73b51a13d57bc Mon Sep 17 00:00:00 2001 From: adustman Date: Sat, 10 Feb 2007 05:37:00 +0000 Subject: [PATCH] Fix bug #1567804: Make sure lists are copies/slices and not just the original --- MySQLdb/MySQLdb/connections.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/MySQLdb/MySQLdb/connections.py b/MySQLdb/MySQLdb/connections.py index 21bd588..52128d6 100644 --- a/MySQLdb/MySQLdb/connections.py +++ b/MySQLdb/MySQLdb/connections.py @@ -138,9 +138,15 @@ class Connection(_mysql.connection): else: conv = conversions - kwargs2['conv'] = dict([ (k, v) for k, v in conv.items() - if type(k) is int ]) - + conv2 = {} + for k, v in conv.items(): + if isinstance(k, int): + if isinstance(v, list): + conv2[k] = v[:] + else: + conv2[k] = v + kwargs2['conv'] = conv2 + self.cursorclass = kwargs2.pop('cursorclass', self.default_cursor) charset = kwargs2.pop('charset', '')