summaryrefslogtreecommitdiffstats
path: root/Modules/grpmodule.c
diff options
context:
space:
mode:
authorBarry Warsaw <barry@python.org>2004-01-20 21:06:00 (GMT)
committerBarry Warsaw <barry@python.org>2004-01-20 21:06:00 (GMT)
commitc7a770932156c80ad462a6c72f7cb70f10ea9417 (patch)
treee3695a594de572a66a4b843b68affe571572ab08 /Modules/grpmodule.c
parent734fb5724ffd005fd13b1d7512b479554c5c9efd (diff)
downloadcpython-c7a770932156c80ad462a6c72f7cb70f10ea9417.zip
cpython-c7a770932156c80ad462a6c72f7cb70f10ea9417.tar.gz
cpython-c7a770932156c80ad462a6c72f7cb70f10ea9417.tar.bz2
grp_getgrgid(), grp_getgrnam(): Patch # 868499, improvement to the error
messages.
Diffstat (limited to 'Modules/grpmodule.c')
-rw-r--r--Modules/grpmodule.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Modules/grpmodule.c b/Modules/grpmodule.c
index ab9d3c5..136dca0 100644
--- a/Modules/grpmodule.c
+++ b/Modules/grpmodule.c
@@ -90,7 +90,7 @@ grp_getgrgid(PyObject *self, PyObject *args)
if (!PyArg_ParseTuple(args, "i:getgrgid", &gid))
return NULL;
if ((p = getgrgid(gid)) == NULL) {
- PyErr_SetString(PyExc_KeyError, "getgrgid(): gid not found");
+ PyErr_Format(PyExc_KeyError, "getgrgid(): gid not found: %d", gid);
return NULL;
}
return mkgrent(p);
@@ -104,7 +104,7 @@ grp_getgrnam(PyObject *self, PyObject *args)
if (!PyArg_ParseTuple(args, "s:getgrnam", &name))
return NULL;
if ((p = getgrnam(name)) == NULL) {
- PyErr_SetString(PyExc_KeyError, "getgrnam(): name not found");
+ PyErr_Format(PyExc_KeyError, "getgrnam(): name not found: %s", name);
return NULL;
}
return mkgrent(p);