1
0
mirror of https://github.com/xtacocorex/CHIP_IO synced 2025-07-20 04:43:21 +00:00

More error checking work

This commit is contained in:
fordsfords
2016-07-04 14:45:41 -05:00
parent 694aa37f23
commit 45ba0e5332

View File

@ -170,7 +170,9 @@ static PyObject *py_output_gpio(PyObject *self, PyObject *args)
if (!module_setup || dyn_int_array_get(&gpio_direction, gpio, -1) != OUTPUT)
{
PyErr_SetString(PyExc_RuntimeError, "The GPIO channel has not been setup() as an OUTPUT");
char err[2000];
snprintf(err, sizeof(err), "Channel %s not set up or is not an output", channel);
PyErr_SetString(PyExc_RuntimeError, err);
return NULL;
}