(self, name, cmd)
return cmd[0].lower() == "on"
Parse and verify boolean parameter
Parse and verify boolean parameter
Parse and verify boolean parameter
def _boolean_command(self, name, cmd):
        "Parse and verify boolean parameter"
        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"
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"