From: Michael W. Hudson Date: Tue, 26 Mar 2002 09:57:13 +0000 (+0000) Subject: It made it. X-Git-Tag: v2.2.1c2~11 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=4f0c5d4b4b7311c5caf94c048121763048110bc9;p=thirdparty%2FPython%2Fcpython.git It made it. 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). --- diff --git a/Lib/pickle.py b/Lib/pickle.py index 4cc6629d532e..eb360dd8f4c6 100644 --- a/Lib/pickle.py +++ b/Lib/pickle.py @@ -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