def valid(self):
    if (not self.value):
        return True
    if (self.value in self.commands):
        return True
    else:
        return ("Unknown API command: '%s'. Possible: %s" % (self.value, self.commands))
def valid(self):
    if (not self.value):
        return True
    if (self.value in self.commands):
        return True
    else:
        return ("Unknown API command: '%s'. Possible: %s" % (self.value, self.commands))