Fix bug 605849 (I hope).

This commit is contained in:
adustman
2003-07-07 21:44:40 +00:00
parent 0b5983676a
commit 0fccc960c1

View File

@@ -88,7 +88,9 @@ def Instance2Str(o, d):
if not cl and hasattr(types, 'ObjectType'):
cl = filter(lambda x,o=o:
type(x) is types.TypeType
and isinstance(o, x), d.keys())
and isinstance(o, x)
and d[x] is not Instance2Str,
d.keys())
if not cl:
return d[types.StringType](o,d)
d[o.__class__] = d[cl[0]]