Don't log nil errors in CNI DEL
This commit is contained in:
1 parent
4a1a1e83c8
commit
62dbe03193
1 file changed
+3
-1
+3
-1
@@ -207,7 +207,9 @@ func (c *CNIPlugin) CmdDel(args *skel.CmdArgs) error {
|
|||||||
} else {
|
} else {
|
||||||
err = ipam.ExecDel(conf.IPAM.Type, args.StdinData)
|
err = ipam.ExecDel(conf.IPAM.Type, args.StdinData)
|
||||||
}
|
}
|
||||||
logOnStderr(fmt.Errorf("unable to release IP address: %s", err))
|
if err != nil {
|
||||||
|
logOnStderr(fmt.Errorf("unable to release IP address: %s", err))
|
||||||
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user