Fix T38402: invalid message for bad type assignments (Quat, Vector)
This commit is contained in:
@@ -225,7 +225,7 @@ static int Color_ass_item(ColorObject *self, int i, PyObject *value)
|
||||
if (f == -1 && PyErr_Occurred()) { /* parsed item not a number */
|
||||
PyErr_SetString(PyExc_TypeError,
|
||||
"color[item] = x: "
|
||||
"argument not a number");
|
||||
"assigned value not a number");
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -722,7 +722,7 @@ static int Color_channel_hsv_set(ColorObject *self, PyObject *value, void *type)
|
||||
if (f == -1 && PyErr_Occurred()) {
|
||||
PyErr_SetString(PyExc_TypeError,
|
||||
"color.h/s/v = value: "
|
||||
"argument not a number");
|
||||
"assigned value not a number");
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
@@ -411,7 +411,7 @@ static int Euler_ass_item(EulerObject *self, int i, PyObject *value)
|
||||
if (f == -1 && PyErr_Occurred()) { /* parsed item not a number */
|
||||
PyErr_SetString(PyExc_TypeError,
|
||||
"euler[attribute] = x: "
|
||||
"argument not a number");
|
||||
"assigned value not a number");
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
@@ -583,7 +583,7 @@ static int Quaternion_ass_item(QuaternionObject *self, int i, PyObject *ob)
|
||||
if (scalar == -1.0f && PyErr_Occurred()) { /* parsed item not a number */
|
||||
PyErr_SetString(PyExc_TypeError,
|
||||
"quaternion[index] = x: "
|
||||
"index argument not a number");
|
||||
"assigned value not a number");
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
@@ -1295,7 +1295,7 @@ static int vector_ass_item_internal(VectorObject *self, int i, PyObject *value,
|
||||
if ((scalar = PyFloat_AsDouble(value)) == -1.0f && PyErr_Occurred()) { /* parsed item not a number */
|
||||
PyErr_SetString(PyExc_TypeError,
|
||||
"vector[index] = x: "
|
||||
"index argument not a number");
|
||||
"assigned value not a number");
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user