Skip to content

Commit

Permalink
Merge pull request kubernetes#11949 from justinsb/golang_switch_type_…
Browse files Browse the repository at this point in the history
…autocast

Cleanup kubernetes#11029 to use go autocast-after-type-switch
  • Loading branch information
mikedanese committed Jul 30, 2015
2 parents 7153671 + edd21d1 commit 1ae4a94
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions pkg/cloudprovider/aws/aws.go
Original file line number Diff line number Diff line change
Expand Up @@ -1694,10 +1694,9 @@ func (s *AWSCloud) ensureSecurityGroup(name string, description string, vpcID st
createResponse, err := s.ec2.CreateSecurityGroup(createRequest)
if err != nil {
ignore := false
switch err.(type) {
switch err := err.(type) {
case awserr.Error:
awsError := err.(awserr.Error)
if awsError.Code() == "InvalidGroup.Duplicate" && attempt < MaxReadThenCreateRetries {
if err.Code() == "InvalidGroup.Duplicate" && attempt < MaxReadThenCreateRetries {
glog.V(2).Infof("Got InvalidGroup.Duplicate while creating security group (race?); will retry")
ignore = true
}
Expand Down

0 comments on commit 1ae4a94

Please sign in to comment.