(self, value, param, ctx)
Validate and parse thread number.
Validate and parse thread number.
Validate and parse thread number .
def convert(self, value, param, ctx):
        """Validate and parse thread number."""
        try:
            if value.lower() == "all_cpus":
                return "ALL_CPUS"
            else:
                return int(value)
        except (TypeError, ValueError):
            raise click.ClickException("{} is not a valid thread value.".format(value))
def convert ( self , value , param , ctx ) : try : if value . lower ( ) == "all_cpus" : return "ALL_CPUS" else : return int ( value ) except ( TypeError , ValueError ) : raise click . ClickException ( "{} is not a valid thread value." . format ( value ) )