Signed-off-by: Andrew Bartlett <abartlet@samba.org>
if (mod == NULL) {
PyErr_Format(PyExc_RuntimeError, "Unable to import %s to check type %s",
module, type_name);
if (mod == NULL) {
PyErr_Format(PyExc_RuntimeError, "Unable to import %s to check type %s",
module, type_name);
}
type = (PyTypeObject *)PyObject_GetAttrString(mod, type_name);
}
type = (PyTypeObject *)PyObject_GetAttrString(mod, type_name);
if (type == NULL) {
PyErr_Format(PyExc_RuntimeError, "Unable to find type %s in module %s",
module, type_name);
if (type == NULL) {
PyErr_Format(PyExc_RuntimeError, "Unable to find type %s in module %s",
module, type_name);
}
ret = PyObject_TypeCheck(obj, type);
}
ret = PyObject_TypeCheck(obj, type);