find_class(): We no longer mask all exceptions[1] by transforming them
into SystemError. The latter is definitely not the right thing to do,
so we let any exceptions that occur in the PyObject_GetAttr() call to
simply propagate up if they occur.
[1] Note that pickle only masked ImportError, KeyError, and
AttributeError, but cPickle masked all exceptions.
}
else
global = PyObject_GetAttr(module, py_global_name);
- if (global == NULL) {
- char buf[256 + 37];
- sprintf(buf, "Failed to import class %.128s from module %.128s",
- PyString_AS_STRING((PyStringObject*)py_global_name),
- PyString_AS_STRING((PyStringObject*)py_module_name));
- PyErr_SetString(PyExc_SystemError, buf);
- return NULL;
- }
return global;
}