mirror of
https://github.com/blender/blender
synced 2026-09-29 04:37:17 +03:00
Changing the python error when accessing SCA_JoystickSensor.axisSingle in the wrong mode to an AttributeError instead of a TypeError as this more accurately reflects the problem.
This commit is contained in:
parent
ff165fa986
commit
ef4d599194
1 changed files with 1 additions and 1 deletions
|
|
@ -367,7 +367,7 @@ PyObject *SCA_JoystickSensor::pyattr_get_axis_single(void *self_v, const KX_PYAT
|
|||
SCA_Joystick *joy = ((SCA_JoystickManager *)self->m_eventmgr)->GetJoystickDevice(self->m_joyindex);
|
||||
|
||||
if (self->m_joymode != KX_JOYSENSORMODE_AXIS_SINGLE) {
|
||||
PyErr_SetString(PyExc_TypeError, "val = sensor.axisSingle: Joystick Sensor, not 'Single Axis' type");
|
||||
PyErr_SetString(PyExc_AttributeError, "val = sensor.axisSingle: Joystick Sensor, not 'Single Axis' type");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue