[Python-checkins] CVS: python/dist/src/Modules cPickle.c,2.69,2.70
Barry Warsaw
bwarsaw@users.sourceforge.net
2001年11月15日 15:45:28 -0800
Update of /cvsroot/python/python/dist/src/Modules
In directory usw-pr-cvs1:/tmp/cvs-serv12731/Modules
Modified Files:
cPickle.c
Log Message:
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.
Index: cPickle.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Modules/cPickle.c,v
retrieving revision 2.69
retrieving revision 2.70
diff -C2 -d -r2.69 -r2.70
*** cPickle.c 2001年11月12日 22:26:10 2.69
--- cPickle.c 2001年11月15日 23:45:26 2.70
***************
*** 2538,2549 ****
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;
}
--- 2538,2541 ----