File tree Expand file tree Collapse file tree 1 file changed +8
-10
lines changed
Expand file tree Collapse file tree 1 file changed +8
-10
lines changed Original file line number Diff line number Diff line change 5656
5757ICMP4__ECHO_REQUEST__TYPE = 8
5858ICMP4__ECHO_REQUEST__CODE = 0
59-
6059ICMP6_ECHO_REQUEST_TYPE = 128
6160ICMP6_ECHO_REQUEST_CODE = 0
6261
@@ -209,21 +208,20 @@ def cli(
209208 ctx : click .Context ,
210209 * ,
211210 remote_ip_address : Ip6Address | Ip4Address ,
212- ** kwargs : dict [ str , Any ] ,
211+ ** kwargs : Any ,
213212) -> None :
214213 """
215- Start PyTCP stack and stop it when user presses Ctrl-C.
216214 Start ICMP Echo client.
217215 """
218216
219- match remote_ip_address .version :
220- case IpVersion .IP6 :
221- client = IcmpEchoClient (remote_ip_address = remote_ip_address )
222- case IpVersion .IP4 :
223- client = IcmpEchoClient (remote_ip_address = remote_ip_address )
224-
225- ctx .invoke (stack_cli , subsystem = client , ** kwargs )
217+ ctx .invoke (
218+ stack_cli ,
219+ subsystem = IcmpEchoClient (remote_ip_address = remote_ip_address ),
220+ ** kwargs ,
221+ )
226222
227223
228224if __name__ == "__main__" :
225+ cli .help = (cli .help or "" ).rstrip () + (stack_cli .help or "" )
226+ cli .params += stack_cli .params
229227 cli .main ()
You can’t perform that action at this time.
0 commit comments