diff options
author | Guido van Rossum <guido@python.org> | 1992-09-04 09:45:18 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1992-09-04 09:45:18 (GMT) |
commit | 94472a0374f68fc7c746671eb87dc32253b02f05 (patch) | |
tree | 2771e08e0f6355403716eac5d9db818643f7d732 /Modules/sunaudiodev.c | |
parent | 9a4e3fc56a2bacc7af884117c53b37fdf104daa2 (diff) | |
download | cpython-94472a0374f68fc7c746671eb87dc32253b02f05.zip cpython-94472a0374f68fc7c746671eb87dc32253b02f05.tar.gz cpython-94472a0374f68fc7c746671eb87dc32253b02f05.tar.bz2 |
classobject.c moduleobject.c stdwinmodule.c xxobject.c:
raise AttributeError, not KeyError, when attribute deletion fails.
sunaudiodevmodule.c: check for deletion before calling setmember.
Diffstat (limited to 'Modules/sunaudiodev.c')
-rw-r--r-- | Modules/sunaudiodev.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Modules/sunaudiodev.c b/Modules/sunaudiodev.c index 0cf5613..d02041a 100644 --- a/Modules/sunaudiodev.c +++ b/Modules/sunaudiodev.c @@ -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); } |