'Parse and verify boolean parameter'

def _boolean_command(self, name, cmd):

    if ((len(cmd) != 1) or (cmd[0].lower() not in ('on', 'off'))):
        raise self.Error((name + '    expected    ON    or    OFF'))
    return (cmd[0].lower() == 'on')
