This fixes a small bug that causes piglit to print an exception when ./piglit is called with no arguments. It will, with this patch, print the help message and exit.
Signed-off-by: Dylan Baker <[email protected]> --- piglit | 3 +++ 1 file changed, 3 insertions(+) diff --git a/piglit b/piglit index 05fff14..14094a7 100755 --- a/piglit +++ b/piglit @@ -121,6 +121,9 @@ def main(): input_ = sys.argv[1:] parser = argparse.ArgumentParser() + # This ugly little line just causes piglit to print the help message if + # ./piglit is run without any positional arguments + parser.set_defaults(func=lambda *_, **__: parser.print_help()) subparsers = parser.add_subparsers() print_cmd = subparsers.add_parser('print-cmd', add_help=False, -- 2.9.3 _______________________________________________ Piglit mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/piglit
