[Python-checkins] cpython: Issue #19437: Fix _pickle, don't call _Unpickler_SkipConsumed() with an

victor.stinner python-checkins at python.org
Thu Oct 31 13:44:49 CET 2013


http://hg.python.org/cpython/rev/d191d22a9d23
changeset:   86797:d191d22a9d23
user:        Victor Stinner <victor.stinner at gmail.com>
date:        Thu Oct 31 13:39:23 2013 +0100
summary:
  Issue #19437: Fix _pickle, don't call _Unpickler_SkipConsumed() with an
exception set

files:
  Modules/_pickle.c |  6 +++---
  1 files changed, 3 insertions(+), 3 deletions(-)


diff --git a/Modules/_pickle.c b/Modules/_pickle.c
--- a/Modules/_pickle.c
+++ b/Modules/_pickle.c
@@ -5430,9 +5430,6 @@
         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 @@
         return NULL;
     }
 
+    if (_Unpickler_SkipConsumed(self) < 0)
+        return NULL;
+
     PDATA_POP(self->stack, value);
     return value;
 }

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list