From 49f8ab9689e97957e6e00cb06ffbddc8fd5e7303 Mon Sep 17 00:00:00 2001 From: farcepest Date: Fri, 2 Nov 2012 11:29:59 -0400 Subject: Fix some broken types module references. --- MySQLdb/converters.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'MySQLdb') diff --git a/MySQLdb/converters.py b/MySQLdb/converters.py index 953c4e5..491d49b 100644 --- a/MySQLdb/converters.py +++ b/MySQLdb/converters.py @@ -112,14 +112,14 @@ def Instance2Str(o, d): cl = filter(lambda x,o=o: type(x) is ClassType and isinstance(o, x), d.keys()) - if not cl and hasattr(types, 'ObjectType'): + if not cl: cl = filter(lambda x,o=o: type(x) is TypeType and isinstance(o, x) and d[x] is not Instance2Str, d.keys()) if not cl: - return d[types.StringType](o,d) + return d[StringType](o,d) d[o.__class__] = d[cl[0]] return d[cl[0]](o, d) -- cgit v1.2.1