aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFred Drake <fdrake@acm.org>2000-10-24 19:57:45 +0000
committerFred Drake <fdrake@acm.org>2000-10-24 19:57:45 +0000
commit661ea26b3d8621ad0acc0ed2f2036ab29355f8ff (patch)
treefcfe10c4656a3e18911cd3b41b7d8c942d707786 /Modules/dbmmodule.c
parentInsert the current directory to the front of sys.path -- and remove it (diff)
downloadcpython-661ea26b3d8621ad0acc0ed2f2036ab29355f8ff.tar.gz
cpython-661ea26b3d8621ad0acc0ed2f2036ab29355f8ff.tar.bz2
cpython-661ea26b3d8621ad0acc0ed2f2036ab29355f8ff.zip
Ka-Ping Yee <ping@lfw.org>:
Changes to error messages to increase consistency & clarity. This (mostly) closes SourceForge patch #101839.
Diffstat (limited to 'Modules/dbmmodule.c')
-rw-r--r--Modules/dbmmodule.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/Modules/dbmmodule.c b/Modules/dbmmodule.c
index 7e16d9b1e03..684736460b2 100644
--- a/Modules/dbmmodule.c
+++ b/Modules/dbmmodule.c
@@ -140,7 +140,7 @@ dbm_ass_sub(dbmobject *dp, PyObject *v, PyObject *w)
if ( dbm_store(dp->di_dbm, krec, drec, DBM_REPLACE) < 0 ) {
dbm_clearerr(dp->di_dbm);
PyErr_SetString(DbmError,
- "Cannot add item to database");
+ "cannot add item to database");
return -1;
}
}
@@ -255,7 +255,7 @@ dbm_setdefault(register dbmobject *dp, PyObject *args)
val.dsize = PyString_GET_SIZE(defvalue);
if (dbm_store(dp->di_dbm, key, val, DBM_INSERT) < 0) {
dbm_clearerr(dp->di_dbm);
- PyErr_SetString(DbmError, "Cannot add item to database");
+ PyErr_SetString(DbmError, "cannot add item to database");
return NULL;
}
return defvalue;
@@ -325,7 +325,7 @@ dbmopen(PyObject *self, PyObject *args)
iflags = O_RDWR|O_CREAT|O_TRUNC;
else {
PyErr_SetString(DbmError,
- "Flags should be one of 'r', 'w', 'c' or 'n'");
+ "arg 2 to open should be 'r', 'w', 'c', or 'n'");
return NULL;
}
return newdbmobject(name, iflags, mode);