Commit 544d93c7 authored by Kevin Modzelewski's avatar Kevin Modzelewski

Fix for pre-existing BoxedWrapperDescriptor bug

parent 5a83ff1c
...@@ -393,9 +393,11 @@ Box* BoxedWrapperDescriptor::descr_get(Box* _self, Box* inst, Box* owner) noexce ...@@ -393,9 +393,11 @@ Box* BoxedWrapperDescriptor::descr_get(Box* _self, Box* inst, Box* owner) noexce
if (inst == None) if (inst == None)
return self; return self;
if (!isSubclass(inst->cls, self->type)) if (!isSubclass(inst->cls, self->type)) {
PyErr_Format(TypeError, "Descriptor '' for '%s' objects doesn't apply to '%s' object", PyErr_Format(TypeError, "Descriptor '' for '%s' objects doesn't apply to '%s' object",
getFullNameOfClass(self->type).c_str(), getFullTypeName(inst).c_str()); getFullNameOfClass(self->type).c_str(), getFullTypeName(inst).c_str());
return NULL;
}
return new BoxedWrapperObject(self, inst); return new BoxedWrapperObject(self, inst);
} }
......
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