[Piglit] [PATCH] framework: Fix piglit-command
Dylan Baker
dylan at pnwbakers.com
Fri Aug 26 18:59:12 UTC 2016
This actually fixes the help message for the piglit command, but doesn't
break using other commands, like the last patch.
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