Browse Source

remove []byte trans, handle func error

pull/1150/head
yuzhiquan 5 years ago
parent
commit
24869ddf21
  1. 2
      pkg/agent/containerd/containerd.go
  2. 4
      pkg/agent/netpol/utils.go

2
pkg/agent/containerd/containerd.go

@ -197,7 +197,7 @@ func getPrivateRegistries(ctx context.Context, cfg *config.Node) (*templates.Reg
return nil, err
}
logrus.Infof("Using registry config file at %s", cfg.AgentConfig.PrivateRegistry)
if err := yaml.Unmarshal([]byte(privRegistryFile), &privRegistries); err != nil {
if err := yaml.Unmarshal(privRegistryFile, &privRegistries); err != nil {
return nil, err
}
return privRegistries, nil

4
pkg/agent/netpol/utils.go

@ -246,8 +246,8 @@ func (entry *Entry) Del() error {
if err != nil {
return err
}
entry.Set.Parent.Save()
return nil
return entry.Set.Parent.Save()
}
// Test wether an entry is in a set or not. Exit status number is zero if the

Loading…
Cancel
Save