| 659 | } |
| 660 | |
| 661 | int PropertyContainerPy::setCustomAttributes(const char* attr, PyObject* obj) |
| 662 | { |
| 663 | // search in PropertyList |
| 664 | Property* prop = getPropertyContainerPtr()->getPropertyByName(attr); |
| 665 | if (prop) { |
| 666 | // Read-only attributes must not be set over its Python interface |
| 667 | if (prop->testStatus(Property::Immutable)) { |
| 668 | std::stringstream s; |
| 669 | s << "Object attribute '" << attr << "' is read-only"; |
| 670 | throw Py::AttributeError(s.str()); |
| 671 | } |
| 672 | |
| 673 | FC_TRACE("Set property " << prop->getFullName()); |
| 674 | prop->setPyObject(obj); |
| 675 | return 1; |
| 676 | } |
| 677 | |
| 678 | return 0; |
| 679 | } |
| 680 | |
| 681 | PyObject* PropertyContainerPy::renameProperty(PyObject* args) const |
| 682 | { |
nothing calls this directly
no test coverage detected