classobject.c moduleobject.c stdwinmodule.c xxobject.c:

raise AttributeError, not KeyError, when attribute deletion fails.
sunaudiodevmodule.c: check for deletion before calling setmember.
This commit is contained in:
Guido van Rossum 1992-09-04 09:45:18 +00:00
parent 9a4e3fc56a
commit 94472a0374
5 changed files with 56 additions and 15 deletions

View file

@ -343,6 +343,12 @@ sads_setattr(xp, name, v)
char *name;
object *v;
{
if (v == NULL) {
err_setstr(TypeError,
"can't delete sun audio status attributes");
return NULL;
}
return setmember((char *)&xp->ai, sads_ml, name, v);
}