mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-03 17:30:00 +00:00
Merge pull request #129251 from alingse/patch-1
fix check errRaw != nil but return a nil value error err
This commit is contained in:
commit
f06716edb1
@ -325,7 +325,7 @@ func GetKubeletHeapStats(ctx context.Context, c clientset.Interface, nodeName st
|
|||||||
}
|
}
|
||||||
raw, errRaw := client.Raw()
|
raw, errRaw := client.Raw()
|
||||||
if errRaw != nil {
|
if errRaw != nil {
|
||||||
return "", err
|
return "", errRaw
|
||||||
}
|
}
|
||||||
kubeletstatsv1alpha1 := string(raw)
|
kubeletstatsv1alpha1 := string(raw)
|
||||||
// Only dumping the runtime.MemStats numbers to avoid polluting the log.
|
// Only dumping the runtime.MemStats numbers to avoid polluting the log.
|
||||||
|
Loading…
Reference in New Issue
Block a user