diff MySQLdb/connections.py @ 5:b70cce9bd065 MySQLdb

Merge changes from 1.2 branch r456-468
author adustman
date Sun, 11 Feb 2007 04:37:29 +0000
parents b5a377255eea
children 0e37ee00beb7
line wrap: on
line diff
--- a/MySQLdb/connections.py	Tue Oct 24 19:52:31 2006 +0000
+++ b/MySQLdb/connections.py	Sun Feb 11 04:37:29 2007 +0000
@@ -138,9 +138,15 @@
         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', '')