providers/digitalocean: fix 404 check

This commit is contained in:
Jack Pearkes 2014-07-24 17:57:23 -04:00
parent d70b451b58
commit 9d75352fd3
1 changed files with 1 additions and 1 deletions

View File

@ -195,7 +195,7 @@ func resource_digitalocean_droplet_destroy(
err := client.DestroyDroplet(s.ID)
// Handle remotely destroyed droplets
if strings.Contains(err.Error(), "404 Not Found") {
if err != nil && strings.Contains(err.Error(), "404 Not Found") {
return nil
}