Compromise on test in find_class(): a user-defined function is okay,
but a built-in function is not.
This commit is contained in:
parent
cab3c3b8d4
commit
36fc11e894
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue