providers/aws: style

This commit is contained in:
Mitchell Hashimoto 2014-07-07 17:12:22 -07:00
parent e33739209b
commit bdc2a53c9d
1 changed files with 3 additions and 2 deletions

View File

@ -122,10 +122,11 @@ func IGStateRefreshFunc(conn *ec2.EC2, id string) resource.StateRefreshFunc {
return func() (interface{}, string, error) {
resp, err := conn.DescribeInternetGateways([]string{id}, ec2.NewFilter())
if err != nil {
if ec2err, ok := err.(*ec2.Error); ok && ec2err.Code == "InvalidInternetGatewayID.NotFound" {
ec2err, ok := err.(*ec2.Error)
if ok && ec2err.Code == "InvalidInternetGatewayID.NotFound" {
resp = nil
} else {
log.Printf("Error on IGStateRefresh: %s", err)
log.Printf("[ERROR] Error on IGStateRefresh: %s", err)
return nil, "", err
}
}