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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 12/12/2017 19:04, Stefan Raspl wrote:
> On 12.12.2017 16:56, Paolo Bonzini wrote:
>> 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:"?
> 
> Yes, that needs to be a 1: indeed - not sure what I was thinking :O

Fine then. :)

Paolo




[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux