mirror of
https://github.com/python/cpython.git
synced 2025-11-02 03:01:58 +00:00
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:
parent
9a4e3fc56a
commit
94472a0374
5 changed files with 56 additions and 15 deletions
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue