provider/openstack: gophercloud migration: util

This commit is contained in:
Joe Topjian 2016-09-04 02:51:22 +00:00
parent 74f990ff5c
commit e677eaac6b
1 changed files with 2 additions and 2 deletions

View File

@ -3,14 +3,14 @@ package openstack
import (
"fmt"
"github.com/gophercloud/gophercloud"
"github.com/hashicorp/terraform/helper/schema"
"github.com/rackspace/gophercloud"
)
// CheckDeleted checks the error to see if it's a 404 (Not Found) and, if so,
// sets the resource ID to the empty string instead of throwing an error.
func CheckDeleted(d *schema.ResourceData, err error, msg string) error {
errCode, ok := err.(*gophercloud.UnexpectedResponseCodeError)
errCode, ok := err.(*gophercloud.ErrUnexpectedResponseCode)
if !ok {
return fmt.Errorf("%s: %s", msg, err)
}