If we encouter an arg that is not a named flag/arg, and the next
item in the command description is non-positional, then raise an
'unexpected argument' exception.
Signed-off-by: Sage Weil <sage@newdream.net>
store_arg(kwarg_desc, d)
continue
+ if not desc.positional:
+ # No more positional args!
+ raise ArgumentValid(f"Unexpected argument '{myarg}'")
+
# Don't handle something as a positional argument if it
# has a leading "--" unless it's a CephChoices (used for
# "--yes-i-really-mean-it")