diff options
-rw-r--r-- | Modules/cPickle.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Modules/cPickle.c b/Modules/cPickle.c index 4961c3b..105a2e9 100644 --- a/Modules/cPickle.c +++ b/Modules/cPickle.c @@ -2418,6 +2418,11 @@ save(Picklerobject *self, PyObject *args, int pers_save) case 'f': if (type == &PyFunction_Type) { res = save_global(self, args, NULL); + if (res && PyErr_ExceptionMatches(PickleError)) { + /* fall back to reduce */ + PyErr_Clear(); + break; + } goto finally; } break; |