matt-kimball / mtr-packet-python

Asynchronous network probes for Python
Other
48 stars 6 forks source link

'ip_version' keyword argument to MtrPacket.probe causes 'unexpected keyword argument' #3

Closed slowaak49 closed 1 year ago

slowaak49 commented 3 years ago

Attempting to specify the IP version using the 'ip_version' keyword argument to MtrPacket.probe fails due to problems in the _package_args method which has special handling for the argument at lines 516-518 however later at lines 546-547 the mangled argument keyname is checked against a list that doesn't include 'ip-version' (lines 530-533). One of two things needs to happen for 'ip_version' to work as expected:

  1. At or after lines 516-518 the argument key 'ip_version' should be removed from the 'args' hash with a 'pop' or 'del'.
  2. Add 'ip-version' to the valid arguments in line 532.

I don't know what side effects these options might have, so I cannot suggest which is preferrible.

matt-kimball commented 1 year ago

This is fixed with commit febfe91385cf3810084e9271fbdd5180f0551652.

Sorry for the delay.