summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorMartin v. Löwis <martin@v.loewis.de>2002-09-16 17:26:24 (GMT)
committerMartin v. Löwis <martin@v.loewis.de>2002-09-16 17:26:24 (GMT)
commit658009afdb429a9507852c72086337c42bcf1532 (patch)
treead75b93efb4806792068ffe8163eb95ba764aa01 /Modules
parent258cba8442e5443e689c4ae371f30eb541d05f93 (diff)
downloadcpython-658009afdb429a9507852c72086337c42bcf1532.zip
cpython-658009afdb429a9507852c72086337c42bcf1532.tar.gz
cpython-658009afdb429a9507852c72086337c42bcf1532.tar.bz2
Make BadPickleGet a class. Fixes #609164.
Diffstat (limited to 'Modules')
-rw-r--r--Modules/cPickle.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/Modules/cPickle.c b/Modules/cPickle.c
index 14936a6..32fdd6e 100644
--- a/Modules/cPickle.c
+++ b/Modules/cPickle.c
@@ -4760,6 +4760,10 @@ init_stuff(PyObject *module_dict)
PickleError, NULL)))
return -1;
+ if (!( BadPickleGet = PyErr_NewException("cPickle.BadPickleGet",
+ UnpicklingError, NULL)))
+ return -1;
+
if (PyDict_SetItemString(module_dict, "PickleError",
PickleError) < 0)
return -1;
@@ -4776,9 +4780,6 @@ init_stuff(PyObject *module_dict)
UnpickleableError) < 0)
return -1;
- if (!( BadPickleGet = PyString_FromString("cPickle.BadPickleGet")))
- return -1;
-
if (PyDict_SetItemString(module_dict, "BadPickleGet",
BadPickleGet) < 0)
return -1;