Spreadsheet: Don't return error message when custom attribute is not found.

This commit is contained in:
Eivind Kvedalen
2015-02-16 00:14:50 +01:00
committed by wmayer
parent e0f4e74b9e
commit d201aec70c

View File

@@ -862,10 +862,8 @@ PyObject *SheetPy::getCustomAttributes(const char* attr) const
{
App::Property * prop = this->getSheetPtr()->getPropertyByName(attr);
if (prop == 0) {
PyErr_SetString(PyExc_ValueError, "Invalid address or property.");
if (prop == 0)
return 0;
}
return prop->getPyObject();
}