Commit 7831dfbd authored by Guido van Rossum's avatar Guido van Rossum

Compromise on test in find_class(): a user-defined function is okay,

but a built-in function is not.
parent d1cbbfed
......@@ -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)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment