k8sclient: Add missing error check

Before this change, error returned by `libcni.ConfFiles` was
silently ignored.

Signed-off-by: Michal Rostecki <mrostecki@suse.de>
This commit is contained in:
Michal Rostecki
2018-11-27 17:34:20 +01:00
committed by dougbtv
parent 570a81d641
commit 0a59253609

View File

@@ -580,6 +580,9 @@ func getNetDelegate(client KubeClient, netname string, confdir string) (*types.D
if err == nil {
if fInfo.IsDir() {
files, err := libcni.ConfFiles(netname, []string{".conf", ".conflist"})
if err != nil {
return nil, err
}
if len(files) > 0 {
var configBytes []byte
configBytes, err = getCNIConfigFromFile("", netname)