summaryrefslogtreecommitdiffstats
path: root/Modules/cPickle.c
diff options
context:
space:
mode:
authorBarry Warsaw <barry@python.org>2001-11-15 23:45:26 (GMT)
committerBarry Warsaw <barry@python.org>2001-11-15 23:45:26 (GMT)
commit9b481ff3d699a055e9639fd580e515c3748d5dc4 (patch)
treec43a57198924873731975fc5178ae4173140fd04 /Modules/cPickle.c
parentbf4d959d28eacf5c57afe56abbf463272cef7557 (diff)
downloadcpython-9b481ff3d699a055e9639fd580e515c3748d5dc4.zip
cpython-9b481ff3d699a055e9639fd580e515c3748d5dc4.tar.gz
cpython-9b481ff3d699a055e9639fd580e515c3748d5dc4.tar.bz2
A change to sync with pickle.py:
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.
Diffstat (limited to 'Modules/cPickle.c')
-rw-r--r--Modules/cPickle.c8
1 files changed, 0 insertions, 8 deletions
diff --git a/Modules/cPickle.c b/Modules/cPickle.c
index 54a1151..17bc7a9 100644
--- a/Modules/cPickle.c
+++ b/Modules/cPickle.c
@@ -2537,14 +2537,6 @@ find_class(PyObject *py_module_name, PyObject *py_global_name, PyObject *fc) {
}
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;
}