[Piglit] [PATCH] framework: Fix piglit-command

Jordan Justen jordan.l.justen at intel.com
Sat Aug 27 01:29:39 UTC 2016


On 2016-08-26 11:59:12, Dylan Baker wrote:
> This actually fixes the help message for the piglit command, but doesn't
> break using other commands, like the last patch.
> 

I tried the 'summary console' command with your previous patch, and it
seemed to work. It must have been some other interaction...

This one works too, so:

Reviewed-by: Jordan Justen <jordan.l.justen at intel.com>

> Signed-off-by: Dylan Baker <dylanx.c.baker at intel.com>
> CC: jordan.l.justen at intel.com
> ---
>  piglit | 6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/piglit b/piglit
> index 05fff14..4ce6c41 100755
> --- a/piglit
> +++ b/piglit
> @@ -162,7 +162,11 @@ def main():
>      # example), and then pass the arguments that this parser doesn't know about
>      # to that executable
>      parsed, args = parser.parse_known_args(input_)
> -    returncode = parsed.func(args)
> +    try:
> +        returncode = parsed.func(args)
> +    except AttributeError:
> +        parser.print_help()
> +        sys.exit(1)
>      sys.exit(returncode)
>  
>  
> -- 
> 2.9.3
> 


More information about the Piglit mailing list