summaryrefslogtreecommitdiffstats
path: root/Modules/_dbmmodule.c
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2008-05-28 08:43:17 (GMT)
committerGeorg Brandl <georg@python.org>2008-05-28 08:43:17 (GMT)
commitb17acad68ea21c60dbc2088644f2934032304628 (patch)
treecc040cbefab321dd34a06599f9a49a83a37977c1 /Modules/_dbmmodule.c
parente81f5ef1ebf57e9df2cfefabb5c5fa67defa6d2f (diff)
downloadcpython-b17acad68ea21c60dbc2088644f2934032304628.zip
cpython-b17acad68ea21c60dbc2088644f2934032304628.tar.gz
cpython-b17acad68ea21c60dbc2088644f2934032304628.tar.bz2
Make db modules' error classes inherit IOError.
Stop dbm from importing every dbm module when imported.
Diffstat (limited to 'Modules/_dbmmodule.c')
-rw-r--r--Modules/_dbmmodule.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/Modules/_dbmmodule.c b/Modules/_dbmmodule.c
index ddfd4cd..7e80381 100644
--- a/Modules/_dbmmodule.c
+++ b/Modules/_dbmmodule.c
@@ -401,7 +401,8 @@ init_dbm(void) {
return;
d = PyModule_GetDict(m);
if (DbmError == NULL)
- DbmError = PyErr_NewException("_dbm.error", NULL, NULL);
+ DbmError = PyErr_NewException("_dbm.error",
+ PyExc_IOError, NULL);
s = PyUnicode_FromString(which_dbm);
if (s != NULL) {
PyDict_SetItemString(d, "library", s);