From 21a81af35471e34ede79e0beb986125db3f0f604 Mon Sep 17 00:00:00 2001 From: Dennis Lawler <4824647+drawlerr@users.noreply.github.com> Date: Tue, 3 Mar 2020 03:50:23 -0700 Subject: [PATCH] Fix exception on invocation with no args (#200) --- night_rally/admin.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/night_rally/admin.py b/night_rally/admin.py index 3293b97d75bc2..aa639baeed512 100644 --- a/night_rally/admin.py +++ b/night_rally/admin.py @@ -291,6 +291,9 @@ def valid_date(v): title="subcommands", dest="subcommand", help="") + # the keyword argument in #add_subparsers() only works in Python 3.7+. + # See https://docs.python.org/3.7/library/argparse.html#argparse.ArgumentParser.add_subparsers + subparsers.required = True # list races --max-results=20 # list annotations --max-results=20