Merge pull request #1018 from priteau/openstack-state-fix

Properly return error when invalid instance state is found
This commit is contained in:
Ross Smith II 2014-04-21 07:30:18 -07:00
commit fd4dd284fb
1 changed files with 1 additions and 2 deletions

View File

@ -75,8 +75,7 @@ func WaitForState(conf *StateChangeConf) (i interface{}, err error) {
}
if !found {
fmt.Errorf("unexpected state '%s', wanted target '%s'", currentState, conf.Target)
return
return nil, fmt.Errorf("unexpected state '%s', wanted target '%s'", currentState, conf.Target)
}
log.Printf("Waiting for state to become: %s currently %s (%d%%)", conf.Target, currentState, currentProgress)