mirror of
https://github.com/python/cpython.git
synced 2025-11-03 03:22:27 +00:00
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:
parent
7e78acbb1b
commit
85ee491b3a
1 changed files with 5 additions and 1 deletions
|
|
@ -164,7 +164,11 @@ class Pickler:
|
||||||
try:
|
try:
|
||||||
f = self.dispatch[t]
|
f = self.dispatch[t]
|
||||||
except KeyError:
|
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)
|
self.save_global(object)
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue