From 4d70852735a6128095475082e40f4080f3fcd4c7 Mon Sep 17 00:00:00 2001 From: kylev Date: Mon, 18 May 2009 21:12:38 +0000 Subject: [PATCH] Bug #1774101 was caused by only copying things that had integer keys. We really want to copy all key/value pairs and specially handle the int->list case. --- MySQLdb/MySQLdb/connections.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/MySQLdb/MySQLdb/connections.py b/MySQLdb/MySQLdb/connections.py index 03c7f4e..63801d9 100644 --- a/MySQLdb/MySQLdb/connections.py +++ b/MySQLdb/MySQLdb/connections.py @@ -158,11 +158,10 @@ class Connection(_mysql.connection): conv2 = {} for k, v in conv.items(): - if isinstance(k, int): - if isinstance(v, list): - conv2[k] = v[:] - else: - conv2[k] = v + if isinstance(k, int) and isinstance(v, list): + conv2[k] = v[:] + else: + conv2[k] = v kwargs2['conv'] = conv2 self.cursorclass = kwargs2.pop('cursorclass', self.default_cursor)