if (!getintarg(args, &uid))
return NULL;
if ((p = getpwuid(uid)) == NULL) {
- err_setstr(RuntimeError, "getpwuid(): uid not found");
+ err_setstr(KeyError, "getpwuid(): uid not found");
return NULL;
}
return mkpwent(p);
if (!getstrarg(args, &name))
return NULL;
if ((p = getpwnam(getstringvalue(name))) == NULL) {
- err_setstr(RuntimeError, "getpwnam(): name not found");
+ err_setstr(KeyError, "getpwnam(): name not found");
return NULL;
}
return mkpwent(p);
if (!getintarg(args, &gid))
return NULL;
if ((p = getgrgid(gid)) == NULL) {
- err_setstr(RuntimeError, "getgrgid(): gid not found");
+ err_setstr(KeyError, "getgrgid(): gid not found");
return NULL;
}
return mkgrent(p);
if (!getstrarg(args, &name))
return NULL;
if ((p = getgrnam(getstringvalue(name))) == NULL) {
- err_setstr(RuntimeError, "getgrnam(): name not found");
+ err_setstr(KeyError, "getgrnam(): name not found");
return NULL;
}
return mkgrent(p);