remove deprecated Type attribute

This commit is contained in:
wmayer
2017-09-18 19:01:25 +02:00
parent 20b08561ad
commit 8d420127b7

View File

@@ -80,15 +80,8 @@ Py::String BaseClassPy::getModule(void) const
return Py::String(module);
}
PyObject *BaseClassPy::getCustomAttributes(const char* attr) const
PyObject *BaseClassPy::getCustomAttributes(const char* /*attr*/) const
{
// this attribute is marked 'deprecated' but to keep old code working we
// handle it here. In a future version this will be removed.
if (strcmp(attr, "Type") == 0) {
PyErr_SetString(PyExc_DeprecationWarning, "Use 'TypeId' instead");
PyErr_Print();
return Py::new_reference_to(Py::String(std::string(getBaseClassPtr()->getTypeId().getName())));
}
return 0;
}