diff options
author | Guido van Rossum <guido@python.org> | 1991-12-10 14:00:03 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1991-12-10 14:00:03 (GMT) |
commit | 87e7ea72a6ef9232be9db06038943044c747971b (patch) | |
tree | 0482b0b111b4779a18f680db9a1c5bd10ca0005f /Python/structmember.c | |
parent | 97ff5308fe3e490aac51316cf5575c6119227cc8 (diff) | |
download | cpython-87e7ea72a6ef9232be9db06038943044c747971b.zip cpython-87e7ea72a6ef9232be9db06038943044c747971b.tar.gz cpython-87e7ea72a6ef9232be9db06038943044c747971b.tar.bz2 |
Use new exceptions.
Diffstat (limited to 'Python/structmember.c')
-rw-r--r-- | Python/structmember.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Python/structmember.c b/Python/structmember.c index acdf9c6..bd04e7c 100644 --- a/Python/structmember.c +++ b/Python/structmember.c @@ -103,7 +103,7 @@ getmember(addr, mlist, name) } } - err_setstr(NameError, name); + err_setstr(AttributeError, name); return NULL; } @@ -119,7 +119,7 @@ setmember(addr, mlist, name, v) for (l = mlist; l->name != NULL; l++) { if (strcmp(l->name, name) == 0) { if (l->readonly || l->type == T_STRING) { - err_setstr(RuntimeError, "readonly attribute"); + err_setstr(TypeError, "readonly attribute"); return -1; } addr += l->offset; @@ -178,6 +178,6 @@ setmember(addr, mlist, name, v) } } - err_setstr(NameError, name); + err_setstr(AttributeError, name); return -1; } |