Mercurial > cpython-lru_cache-weakref
diff Python/structmember.c @ 475:e2c3463c4d91 legacy-trunk
Use new exceptions.
| author | Guido van Rossum <guido@python.org> |
|---|---|
| date | Tue, 10 Dec 1991 14:00:03 +0000 |
| parents | 0ac1357cd898 |
| children | 0cd197947d81 |
line wrap: on
line diff
--- a/Python/structmember.c Tue Dec 10 13:59:17 1991 +0000 +++ b/Python/structmember.c Tue Dec 10 14:00:03 1991 +0000 @@ -103,7 +103,7 @@ } } - err_setstr(NameError, name); + err_setstr(AttributeError, name); return NULL; } @@ -119,7 +119,7 @@ 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 @@ } } - err_setstr(NameError, name); + err_setstr(AttributeError, name); return -1; }
