summaryrefslogtreecommitdiff
path: root/piglit
diff options
context:
space:
mode:
authorDylan Baker <dylan@pnwbakers.com>2016-08-25 11:34:57 -0700
committerDylan Baker <dylan@pnwbakers.com>2016-08-25 18:07:17 -0700
commitda99d336fa6dedb378affdf50dea163939e8c8a1 (patch)
tree805fdc588261401b0026545154bc1e0ee58895c4 /piglit
parentfcb0ea162163d04af317ccecef87c107f35d1672 (diff)
piglit: Print help instead of excepting if no arguments are given
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 <dylanx.c.baker@intel.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Diffstat (limited to 'piglit')
-rwxr-xr-xpiglit1
1 files changed, 1 insertions, 0 deletions
diff --git a/piglit b/piglit
index 05fff141e..4bc755547 100755
--- a/piglit
+++ b/piglit
@@ -121,6 +121,7 @@ def main():
input_ = sys.argv[1:]
parser = argparse.ArgumentParser()
+ parser.set_defaults(func=lambda *_, **__: parser.print_help())
subparsers = parser.add_subparsers()
print_cmd = subparsers.add_parser('print-cmd',
add_help=False,