From: Guido van Rossum Date: Tue, 26 Mar 2002 00:51:56 +0000 (+0000) Subject: Fix for SF 502085. X-Git-Tag: v2.3c1~6329 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=85ee491b3af3e1c124522249a52443b4d8c34c88;p=thirdparty%2FPython%2Fcpython.git 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). --- diff --git a/Lib/pickle.py b/Lib/pickle.py index 7e8e6656683e..21ea21536fa6 100644 --- a/Lib/pickle.py +++ b/Lib/pickle.py @@ -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