fix bad return Error

This commit is contained in:
stewart-yu 2017-11-25 08:50:01 +08:00
parent 45db5e7260
commit d8ebc4f88f

View File

@ -91,7 +91,7 @@ func (m *metadata) InstanceID(name types.NodeName) (string, error) {
// InstanceType returns the type of the specified instance.
func (m *metadata) InstanceType(name types.NodeName) (string, error) {
instanceType, err := m.get(metadataTypeInstanceType)
if err == nil {
if err != nil {
return "", fmt.Errorf("could not get instance type: %v", err)
}