mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-16 22:53:22 +00:00
always return false if error not nil in Get(pcb)
Change-Id: I37bd4d8948a8a5c0017966958547904595b28119
This commit is contained in:
@@ -166,15 +166,13 @@ type apiServerPetClient struct {
|
||||
|
||||
// Get gets the pet in the pcb from the apiserver.
|
||||
func (p *apiServerPetClient) Get(pet *pcb) (*pcb, bool, error) {
|
||||
found := true
|
||||
ns := pet.parent.Namespace
|
||||
pod, err := podClient(p.c, ns).Get(pet.pod.Name)
|
||||
if errors.IsNotFound(err) {
|
||||
found = false
|
||||
err = nil
|
||||
return nil, false, nil
|
||||
}
|
||||
if err != nil || !found {
|
||||
return nil, found, err
|
||||
if err != nil {
|
||||
return nil, false, err
|
||||
}
|
||||
realPet := *pet
|
||||
realPet.pod = pod
|
||||
|
Reference in New Issue
Block a user