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).
This commit is contained in:
Guido van Rossum 2002-03-26 00:51:56 +00:00
parent 7e78acbb1b
commit 85ee491b3a
1 changed files with 5 additions and 1 deletions

View File

@ -164,7 +164,11 @@ class Pickler:
try:
f = self.dispatch[t]
except KeyError:
if issubclass(t, TypeType):
try:
issc = issubclass(t, TypeType)
except TypeError: # t is not a class
issc = 0
if issc:
self.save_global(object)
return