diff options
author | Guido van Rossum <guido@python.org> | 2002-03-26 00:51:56 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 2002-03-26 00:51:56 (GMT) |
commit | 85ee491b3af3e1c124522249a52443b4d8c34c88 (patch) | |
tree | 28d027d91f4596ad0e57a0b50e536a53c3b2c225 | |
parent | 7e78acbb1b6c0ea50f059da6e0eb45ff50b93cc4 (diff) | |
download | cpython-85ee491b3af3e1c124522249a52443b4d8c34c88.zip cpython-85ee491b3af3e1c124522249a52443b4d8c34c88.tar.gz cpython-85ee491b3af3e1c124522249a52443b4d8c34c88.tar.bz2 |
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).
-rw-r--r-- | Lib/pickle.py | 6 |
1 files changed, 5 insertions, 1 deletions
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 @@ 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 |