summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNeil Schemenauer <nascheme@enme.ucalgary.ca>2002-03-22 23:02:53 (GMT)
committerNeil Schemenauer <nascheme@enme.ucalgary.ca>2002-03-22 23:02:53 (GMT)
commitfa79c6523508cc908780b16ddfb20b03c2ab4aff (patch)
tree9c7a5ba9f4d675eb6596565071eb2a1bcac6e96f
parent79f181395b8d63c0198a604bdf27e9621ee09e07 (diff)
downloadcpython-fa79c6523508cc908780b16ddfb20b03c2ab4aff.zip
cpython-fa79c6523508cc908780b16ddfb20b03c2ab4aff.tar.gz
cpython-fa79c6523508cc908780b16ddfb20b03c2ab4aff.tar.bz2
Match behavior of the pickle.py module more closely.
-rw-r--r--Modules/cPickle.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/Modules/cPickle.c b/Modules/cPickle.c
index adf7e44..edb4177 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]);