]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
It made it.
authorMichael W. Hudson <mwh@python.net>
Tue, 26 Mar 2002 09:57:13 +0000 (09:57 +0000)
committerMichael W. Hudson <mwh@python.net>
Tue, 26 Mar 2002 09:57:13 +0000 (09:57 +0000)
backport gvanrossum's checkin of
    revision 1.58 of pickle.py

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).

Lib/pickle.py

index 4cc6629d532e97304b382d9bf3937b7c3e477a06..eb360dd8f4c62330486fa61fd3c80f4bd606f879 100644 (file)
@@ -163,7 +163,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