Fix waiting for GCE Operations

This commit is contained in:
Tomek Kulczynski 2015-03-02 13:32:32 +01:00
parent 754a2a8305
commit c4e786c701

View File

@ -17,6 +17,7 @@ limitations under the License.
package gce_cloud
import (
"errors"
"fmt"
"io"
"io/ioutil"
@ -192,6 +193,9 @@ func (gce *GCECloud) waitForRegionOp(op *compute.Operation, region string) error
return err
}
}
if pollOp.Error != nil && len(pollOp.Error.Errors) > 0 {
return errors.New(pollOp.Error.Errors[0].Message)
}
return nil
}