]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Remove code path in cpickle that does not exist in pickle.
authorAlexandre Vassalotti <alexandre@peadrop.com>
Sun, 24 Nov 2013 11:07:35 +0000 (03:07 -0800)
committerAlexandre Vassalotti <alexandre@peadrop.com>
Sun, 24 Nov 2013 11:07:35 +0000 (03:07 -0800)
Modules/_pickle.c

index 31875555e2676f86b2fe594db418f0686c604e48..c8ef2ea86e25e16d93e0d96efee8ed5555652d6f 100644 (file)
@@ -3584,13 +3584,7 @@ save(PicklerObject *self, PyObject *obj, int pers_save)
     }
     else if (type == &PyFunction_Type) {
         status = save_global(self, obj, NULL);
-        if (status < 0 && PyErr_ExceptionMatches(PickleError)) {
-            /* fall back to reduce */
-            PyErr_Clear();
-        }
-        else {
-            goto done;
-        }
+        goto done;
     }
 
     /* XXX: This part needs some unit tests. */