Re: [PATCH v2 09/11] tools/kvm_stat: stop ignoring unhandled arguments

Paolo Bonzini
2017-12-12T15:56:39Z

On 11/12/2017 12:25, Stefan Raspl wrote:
> )
> - (options, _) = optparser.parse_args(sys.argv)
> + options, ukn = optparser.parse_args(sys.argv)
> + if len(ukn) != 1:
> + sys.exit('Error: Unknown argument(s): ' + ', '.join(ukn[-2:]))

I'm replacing this with "unkn". But, why "-2:" instead of "1:"?

Thanks,

Paolo