diff options
author | Daniel Stokes <kupomail@gmail.com> | 2013-07-20 07:15:57 +0400 |
---|---|---|
committer | Daniel Stokes <kupomail@gmail.com> | 2013-07-20 07:15:57 +0400 |
commit | ef4d5991945fb0216d492ff9eda1b9f8f22188fd (patch) | |
tree | 4b2bd2027559baafd8fa63d8e74733c6c760b0c0 | |
parent | ff165fa986a922346723b2a775d234db13d22afd (diff) |
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.
-rw-r--r-- | source/gameengine/GameLogic/SCA_JoystickSensor.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source/gameengine/GameLogic/SCA_JoystickSensor.cpp b/source/gameengine/GameLogic/SCA_JoystickSensor.cpp index c7e31f75306..3cae3bcf160 100644 --- a/source/gameengine/GameLogic/SCA_JoystickSensor.cpp +++ b/source/gameengine/GameLogic/SCA_JoystickSensor.cpp @@ -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; } |