summaryrefslogtreecommitdiffstats
path: root/Modules/_pickle.c
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2011-09-23 17:53:06 (GMT)
committerBenjamin Peterson <benjamin@python.org>2011-09-23 17:53:06 (GMT)
commit3454d524344bf8a0cbe5178ef299e52fcbc0dc84 (patch)
tree4ded7fa1bfa7c7deaf8e4b898350ebb598099fc7 /Modules/_pickle.c
parent7ddbf10589a64efd884ab002b79665559f45019e (diff)
parentadde86d0e31ce486e72a9d1a2a7625e5e34d97e9 (diff)
downloadcpython-3454d524344bf8a0cbe5178ef299e52fcbc0dc84.zip
cpython-3454d524344bf8a0cbe5178ef299e52fcbc0dc84.tar.gz
cpython-3454d524344bf8a0cbe5178ef299e52fcbc0dc84.tar.bz2
merge 3.2
Diffstat (limited to 'Modules/_pickle.c')
-rw-r--r--Modules/_pickle.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/Modules/_pickle.c b/Modules/_pickle.c
index 0fbd440..4389f72 100644
--- a/Modules/_pickle.c
+++ b/Modules/_pickle.c
@@ -5318,13 +5318,12 @@ load(UnpicklerObject *self)
case STOP:
break;
- case '\0':
- PyErr_SetNone(PyExc_EOFError);
- return NULL;
-
default:
- PyErr_Format(UnpicklingError,
- "invalid load key, '%c'.", s[0]);
+ if (s[0] == '\0')
+ PyErr_SetNone(PyExc_EOFError);
+ else
+ PyErr_Format(UnpicklingError,
+ "invalid load key, '%c'.", s[0]);
return NULL;
}