diff options
author | Jim Fulton <jim@zope.com> | 2004-02-08 04:21:26 (GMT) |
---|---|---|
committer | Jim Fulton <jim@zope.com> | 2004-02-08 04:21:26 (GMT) |
commit | 8a1a5945908c7a0b2b487a98431ff46ab934014a (patch) | |
tree | d366a15b19d7e6c171081c025b1f49fff62a964d /Objects | |
parent | ee33b27ef0bd49227aa59f0d3bca67e7f1e0ab64 (diff) | |
download | cpython-8a1a5945908c7a0b2b487a98431ff46ab934014a.zip cpython-8a1a5945908c7a0b2b487a98431ff46ab934014a.tar.gz cpython-8a1a5945908c7a0b2b487a98431ff46ab934014a.tar.bz2 |
Fixed a bug in object.__reduce_ex__ (reduce_2) when using protocol
2. Failure to clear the error when attempts to get the __getstate__
attribute fail caused intermittent errors and odd behavior.
Diffstat (limited to 'Objects')
-rw-r--r-- | Objects/typeobject.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/Objects/typeobject.c b/Objects/typeobject.c index 6403103..f26ddd6 100644 --- a/Objects/typeobject.c +++ b/Objects/typeobject.c @@ -2581,6 +2581,7 @@ reduce_2(PyObject *obj) goto end; } else { + PyErr_Clear(); state = PyObject_GetAttrString(obj, "__dict__"); if (state == NULL) { PyErr_Clear(); |