summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2013-10-31 12:39:23 (GMT)
committerVictor Stinner <victor.stinner@gmail.com>2013-10-31 12:39:23 (GMT)
commit2ae57e3cf8b038d545b67db3c82678e325ac2a41 (patch)
tree9707339f07dddab4d06b7467a2d0768a05b20e62
parentb43ad1d569db4f5046371865ab9b5eb8f0541efa (diff)
downloadcpython-2ae57e3cf8b038d545b67db3c82678e325ac2a41.zip
cpython-2ae57e3cf8b038d545b67db3c82678e325ac2a41.tar.gz
cpython-2ae57e3cf8b038d545b67db3c82678e325ac2a41.tar.bz2
Issue #19437: Fix _pickle, don't call _Unpickler_SkipConsumed() with an
exception set
-rw-r--r--Modules/_pickle.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/Modules/_pickle.c b/Modules/_pickle.c
index f837264..a14a258 100644
--- a/Modules/_pickle.c
+++ b/Modules/_pickle.c
@@ -5430,9 +5430,6 @@ load(UnpicklerObject *self)
break; /* and we are done! */
}
- if (_Unpickler_SkipConsumed(self) < 0)
- return NULL;
-
/* XXX: It is not clear what this is actually for. */
if ((err = PyErr_Occurred())) {
if (err == PyExc_EOFError) {
@@ -5441,6 +5438,9 @@ load(UnpicklerObject *self)
return NULL;
}
+ if (_Unpickler_SkipConsumed(self) < 0)
+ return NULL;
+
PDATA_POP(self->stack, value);
return value;
}