'swig_varlink_getattr' throws a wrong exception
If the attribute of a python object could not found a AttributeException should be thrown instead of a NameException.
This commit is contained in:
parent
fb96ff9613
commit
da44064d6c
1 changed files with 1 additions and 1 deletions
|
|
@ -116,7 +116,7 @@ swig_varlink_getattr(swig_varlinkobject *v, char *n) {
|
||||||
var = var->next;
|
var = var->next;
|
||||||
}
|
}
|
||||||
if (res == NULL && !PyErr_Occurred()) {
|
if (res == NULL && !PyErr_Occurred()) {
|
||||||
PyErr_SetString(PyExc_NameError,"Unknown C global variable");
|
PyErr_SetString(PyExc_AttributeError,"Unknown C global variable");
|
||||||
}
|
}
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue