Commit ac21f6a5 authored by Guido van Rossum's avatar Guido van Rossum

class objects are read-only in restricted mode

parent 055968c0
......@@ -174,6 +174,11 @@ class_setattr(op, name, v)
return -1;
}
}
if (getrestricted()) {
err_setstr(RuntimeError,
"classes are read-only in restricted mode");
return -1;
}
ac = dictlookup(op->cl_dict, name);
if (ac != NULL && is_accessobject(ac))
return setaccessvalue(ac, getowner(), v);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment