diff options
author | Georg Brandl <georg@python.org> | 2008-05-28 08:43:17 +0000 |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2008-05-28 08:43:17 +0000 |
commit | 6d854be667b5f9d3c0c1c36d98cbcc37415979f2 (patch) | |
tree | 4759934f5bb7aebcdb0330bd28a8396b77e57724 /Modules/_dbmmodule.c | |
parent | ca3f9188fd455bb4643a96d78fe03748e65ebdfd (diff) | |
download | cpython-6d854be667b5f9d3c0c1c36d98cbcc37415979f2.tar.gz |
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.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Modules/_dbmmodule.c b/Modules/_dbmmodule.c index ddfd4cd759..7e80381db7 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); |