Commit 85ee491b authored by Guido van Rossum's avatar Guido van Rossum

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).
parent 7e78acbb
...@@ -164,7 +164,11 @@ class Pickler: ...@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment