summaryrefslogtreecommitdiffstats
path: root/Objects/moduleobject.c
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1991-12-10 14:00:03 (GMT)
committerGuido van Rossum <guido@python.org>1991-12-10 14:00:03 (GMT)
commit87e7ea72a6ef9232be9db06038943044c747971b (patch)
tree0482b0b111b4779a18f680db9a1c5bd10ca0005f /Objects/moduleobject.c
parent97ff5308fe3e490aac51316cf5575c6119227cc8 (diff)
downloadcpython-87e7ea72a6ef9232be9db06038943044c747971b.zip
cpython-87e7ea72a6ef9232be9db06038943044c747971b.tar.gz
cpython-87e7ea72a6ef9232be9db06038943044c747971b.tar.bz2
Use new exceptions.
Diffstat (limited to 'Objects/moduleobject.c')
-rw-r--r--Objects/moduleobject.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Objects/moduleobject.c b/Objects/moduleobject.c
index ffc8e74..1104986 100644
--- a/Objects/moduleobject.c
+++ b/Objects/moduleobject.c
@@ -118,7 +118,7 @@ module_getattr(m, name)
}
res = dictlookup(m->md_dict, name);
if (res == NULL)
- err_setstr(NameError, name);
+ err_setstr(AttributeError, name);
else
INCREF(res);
return res;
@@ -131,7 +131,7 @@ module_setattr(m, name, v)
object *v;
{
if (strcmp(name, "__dict__") == 0 || strcmp(name, "__name__") == 0) {
- err_setstr(NameError, "can't assign to reserved member name");
+ err_setstr(TypeError, "can't assign to reserved member name");
return -1;
}
if (v == NULL)