Skip to content

Commit cdf9467

Browse files
committed
[aws] - Fix mistake during cherry pick
datadog:patch
1 parent 43e1161 commit cdf9467

File tree

1 file changed

+4
-4
lines changed
  • staging/src/k8s.io/legacy-cloud-providers/aws

1 file changed

+4
-4
lines changed

staging/src/k8s.io/legacy-cloud-providers/aws/aws.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1922,12 +1922,12 @@ func isAWSErrorInstanceNotFound(err error) bool {
19221922
if awsError, ok := err.(awserr.Error); ok {
19231923
if awsError.Code() == ec2.UnsuccessfulInstanceCreditSpecificationErrorCodeInvalidInstanceIdNotFound {
19241924
return true
1925-
} else if strings.Contains(err.Error(), ec2.UnsuccessfulInstanceCreditSpecificationErrorCodeInvalidInstanceIdNotFound) {
1925+
}
1926+
} else if strings.Contains(err.Error(), ec2.UnsuccessfulInstanceCreditSpecificationErrorCodeInvalidInstanceIdNotFound) {
19261927
// In places like https://github.com/kubernetes/cloud-provider-aws/blob/1c6194aad0122ab44504de64187e3d1a7415b198/pkg/providers/v1/aws.go#L1007,
19271928
// the error has been transformed into something else so check the error string to see if it contains the error code we're looking for.
1928-
return true
1929-
}
1930-
}
1929+
return true
1930+
}
19311931

19321932
return false
19331933
}

0 commit comments

Comments
 (0)