Commit 1102c455 authored by Marius Wachtler's avatar Marius Wachtler

fix getclsattr

parent 9b5137b1
......@@ -1708,8 +1708,9 @@ extern "C" Box* getclsattr(Box* obj, BoxedString* attr) {
else {
gotten = getclsattrInternal<NOT_REWRITABLE>(obj, attr, NULL);
}
RELEASE_ASSERT(gotten, "%s:%s", getTypeName(obj), attr->data());
if (!gotten)
raiseExcHelper(AttributeError, "%s", attr->data());
return gotten;
}
......
......@@ -67,3 +67,8 @@ def f2(b, C):
print f2(False, NewC), f2(False, OldC)
print f2(True, NewC), f2(True, OldC)
try:
with None:
print "inside"
except AttributeError as e:
assert "__exit__" in str(e)
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