Commit 77dedd9e authored by Pierre Riteau's avatar Pierre Riteau

Properly return error when invalid instance state is found

parent 7e970a8c
...@@ -75,8 +75,7 @@ func WaitForState(conf *StateChangeConf) (i interface{}, err error) { ...@@ -75,8 +75,7 @@ func WaitForState(conf *StateChangeConf) (i interface{}, err error) {
} }
if !found { if !found {
fmt.Errorf("unexpected state '%s', wanted target '%s'", currentState, conf.Target) return nil, fmt.Errorf("unexpected state '%s', wanted target '%s'", currentState, conf.Target)
return
} }
log.Printf("Waiting for state to become: %s currently %s (%d%%)", conf.Target, currentState, currentProgress) log.Printf("Waiting for state to become: %s currently %s (%d%%)", conf.Target, currentState, currentProgress)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment