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

Fix and close #50, I really don't understand pointers because Python abstracts that all out for me and C does not.

This commit is contained in:
Robert Wolterman
2017-01-10 01:14:16 +00:00
parent 5723bf15b3
commit 486cf73860
5 changed files with 20 additions and 12 deletions

View File

@ -45,7 +45,8 @@ static PyObject *py_cleanup(PyObject *self, PyObject *args)
if (!PyArg_ParseTuple(args, "|s", &channel))
return NULL;
if (strcmp(channel, "") == 0) {
// The !channel fixes issue #50
if (!channel || strcmp(channel, "") == 0) {
softpwm_cleanup();
} else {
if (!get_key(channel, key)) {