summaryrefslogtreecommitdiffstats
path: root/Lib/pickle.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/pickle.py')
-rw-r--r--Lib/pickle.py6
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