summaryrefslogtreecommitdiff
path: root/Modules/_gdbmmodule.c
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2008-05-28 08:43:17 +0000
committerGeorg Brandl <georg@python.org>2008-05-28 08:43:17 +0000
commitb17acad68ea21c60dbc2088644f2934032304628 (patch)
treecc040cbefab321dd34a06599f9a49a83a37977c1 /Modules/_gdbmmodule.c
parente81f5ef1ebf57e9df2cfefabb5c5fa67defa6d2f (diff)
downloadcpython-git-b17acad68ea21c60dbc2088644f2934032304628.tar.gz
Make db modules' error classes inherit IOError.
Stop dbm from importing every dbm module when imported.
Diffstat (limited to 'Modules/_gdbmmodule.c')
-rw-r--r--Modules/_gdbmmodule.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/_gdbmmodule.c b/Modules/_gdbmmodule.c
index 6c7581969a..abc8837091 100644
--- a/Modules/_gdbmmodule.c
+++ b/Modules/_gdbmmodule.c
@@ -523,7 +523,7 @@ init_gdbm(void) {
if (m == NULL)
return;
d = PyModule_GetDict(m);
- DbmError = PyErr_NewException("_gdbm.error", NULL, NULL);
+ DbmError = PyErr_NewException("_gdbm.error", PyExc_IOError, NULL);
if (DbmError != NULL) {
PyDict_SetItemString(d, "error", DbmError);
s = PyUnicode_FromString(dbmmodule_open_flags);