commit | 85ee491b3af3e1c124522249a52443b4d8c34c88 | [log] [tgz] |
---|---|---|
author | Guido van Rossum <guido@python.org> | Tue Mar 26 00:51:56 2002 +0000 |
committer | Guido van Rossum <guido@python.org> | Tue Mar 26 00:51:56 2002 +0000 |
tree | 28d027d91f4596ad0e57a0b50e536a53c3b2c225 | |
parent | 7e78acbb1b6c0ea50f059da6e0eb45ff50b93cc4 [diff] |
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 7e8e665..21ea215 100644 --- a/Lib/pickle.py +++ b/Lib/pickle.py
@@ -164,7 +164,11 @@ 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