Unverified Commit e551886c authored by Kubernetes Submit Queue's avatar Kubernetes Submit Queue Committed by GitHub

Merge pull request #56359 from stewart-yu/fixExceptedError

Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>. Modify the judgment conditions **What this PR does / why we need it**: It should be a mistakes. **Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*: Fixes #56347 **Special notes for your reviewer**: **Release note**: ```release-note NONE ```
parents d65a8ac9 d8ebc4f8
...@@ -91,7 +91,7 @@ func (m *metadata) InstanceID(name types.NodeName) (string, error) { ...@@ -91,7 +91,7 @@ func (m *metadata) InstanceID(name types.NodeName) (string, error) {
// InstanceType returns the type of the specified instance. // InstanceType returns the type of the specified instance.
func (m *metadata) InstanceType(name types.NodeName) (string, error) { func (m *metadata) InstanceType(name types.NodeName) (string, error) {
instanceType, err := m.get(metadataTypeInstanceType) instanceType, err := m.get(metadataTypeInstanceType)
if err == nil { if err != nil {
return "", fmt.Errorf("could not get instance type: %v", err) return "", fmt.Errorf("could not get instance type: %v", err)
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment