Mailing List Archive

CVS: python/dist/src/Lib pickle.py,1.57,1.58
Update of /cvsroot/python/python/dist/src/Lib
In directory usw-pr-cvs1:/tmp/cvs-serv1307

Modified Files:
pickle.py
Log Message:
Fix for SF 502085.
Don't die when issubclass(t, TypeType) fails.

Bugfix candidate (but I think it's too late for 2.2.1).


Index: pickle.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/pickle.py,v
retrieving revision 1.57
retrieving revision 1.58
diff -C2 -d -r1.57 -r1.58
*** pickle.py 11 Feb 2002 18:12:06 -0000 1.57
--- pickle.py 26 Mar 2002 00:51:56 -0000 1.58
***************
*** 165,169 ****
f = self.dispatch[t]
except KeyError:
! if issubclass(t, TypeType):
self.save_global(object)
return
--- 165,173 ----
f = self.dispatch[t]
except KeyError:
! try:
! issc = issubclass(t, TypeType)
! except TypeError: # t is not a class
! issc = 0
! if issc:
self.save_global(object)
return