From: Neil Schemenauer Date: Fri, 22 Mar 2002 23:02:53 +0000 (+0000) Subject: Match behavior of the pickle.py module more closely. X-Git-Tag: v2.3c1~6393 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=fa79c6523508cc908780b16ddfb20b03c2ab4aff;p=python Match behavior of the pickle.py module more closely. --- diff --git a/Modules/cPickle.c b/Modules/cPickle.c index adf7e4449f..edb41779a2 100644 --- a/Modules/cPickle.c +++ b/Modules/cPickle.c @@ -3843,6 +3843,11 @@ load(Unpicklerobject *self) { break; continue; + case '\0': + /* end of file */ + PyErr_SetNone(PyExc_EOFError); + break; + default: cPickle_ErrFormat(UnpicklingError, "invalid load key, '%s'.", "c", s[0]);