Proper pid parsing
This commit is contained in:
parent
db72f241b9
commit
27604ac5de
@ -276,9 +276,13 @@ var NetDisconnect = &cli.Command{
|
|||||||
|
|
||||||
ids := cctx.Args().Slice()
|
ids := cctx.Args().Slice()
|
||||||
for _, id := range ids {
|
for _, id := range ids {
|
||||||
pid := peer.ID(id)
|
pid, err := peer.IDFromString(id)
|
||||||
|
if err != nil {
|
||||||
|
fmt.Printf("failure")
|
||||||
|
return err
|
||||||
|
}
|
||||||
fmt.Printf("disconnect %s: ", pid.Pretty())
|
fmt.Printf("disconnect %s: ", pid.Pretty())
|
||||||
err := api.NetDisconnect(ctx, pid)
|
err = api.NetDisconnect(ctx, pid)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
fmt.Println("failure")
|
fmt.Println("failure")
|
||||||
return err
|
return err
|
||||||
|
Loading…
Reference in New Issue
Block a user