diff options
author | Guido van Rossum <guido@python.org> | 1996-10-07 14:34:20 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1996-10-07 14:34:20 (GMT) |
commit | 36fc11e894510d1521a934f3e77d596e94431c2f (patch) | |
tree | 2d940b1e35be03128cd0e3dd4687e6077e9a90ef /Lib | |
parent | cab3c3b8d4e376d5d8f4d23b0e805397d359f206 (diff) | |
download | cpython-36fc11e894510d1521a934f3e77d596e94431c2f.zip cpython-36fc11e894510d1521a934f3e77d596e94431c2f.tar.gz cpython-36fc11e894510d1521a934f3e77d596e94431c2f.tar.bz2 |
Compromise on test in find_class(): a user-defined function is okay,
but a built-in function is not.
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/pickle.py | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/Lib/pickle.py b/Lib/pickle.py index 682440d..28f8f90 100644 --- a/Lib/pickle.py +++ b/Lib/pickle.py @@ -473,9 +473,7 @@ class Unpickler: "Failed to import class %s from module %s" % \ (name, module) klass = env[name] - # if type(klass) != ClassType: - if (type(klass) is FunctionType or - type(klass) is BuiltinFunctionType): + if type(klass) is BuiltinFunctionType: raise SystemError, \ "Imported object %s from module %s is not a class" % \ (name, module) |