Running 'limits show' returns nothing

Running limits show without --absolute or --rate returns nothing and
the user is left to figure out what they need to provide to get the
correct data back.  This patch prints an error and help output by making
at least one of the arguments required.

Change-Id: I576cf8ec0e05524ee67d46c48b56da8d44258667
This commit is contained in:
Major Hayden 2015-08-12 16:37:03 -04:00
parent 0cc1e5aa2b
commit 0f0d66f3f1

View File

@ -31,7 +31,7 @@ class ShowLimits(lister.Lister):
def get_parser(self, prog_name): def get_parser(self, prog_name):
parser = super(ShowLimits, self).get_parser(prog_name) parser = super(ShowLimits, self).get_parser(prog_name)
type_group = parser.add_mutually_exclusive_group() type_group = parser.add_mutually_exclusive_group(required=True)
type_group.add_argument( type_group.add_argument(
"--absolute", "--absolute",
dest="is_absolute", dest="is_absolute",