mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 09:23:56 +00:00
Changed return
This commit is contained in:
parent
df917fad12
commit
b80b263607
@ -434,10 +434,10 @@ def get_attribute(attribute, instance_name=None, instance_id=None, region=None,
|
||||
if len(instances) != 1:
|
||||
raise CommandExecutionError('Found more than one EC2 instance matching the criteria.')
|
||||
instance_id = instances[0]
|
||||
attribute = conn.get_instance_attribute(instance_id, attribute)
|
||||
if not attribute:
|
||||
instance_attribute = conn.get_instance_attribute(instance_id, attribute)
|
||||
if not instance_attribute:
|
||||
return False
|
||||
return attribute
|
||||
return {attribute: instance_attribute[attribute]}
|
||||
except boto.exception.BotoServerError as exc:
|
||||
log.error(exc)
|
||||
return False
|
||||
|
Loading…
Reference in New Issue
Block a user