mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-25 20:01:25 -07:00
Fix for py2.6 (no dict comprehensions on py2.6)
This commit is contained in:
parent
c9cc8d0b70
commit
c9b33d5de2
1 changed files with 2 additions and 1 deletions
|
@ -593,7 +593,8 @@ def get_instance_info(inst):
|
||||||
'state': inst.state,
|
'state': inst.state,
|
||||||
'hypervisor': inst.hypervisor,
|
'hypervisor': inst.hypervisor,
|
||||||
'tags': inst.tags,
|
'tags': inst.tags,
|
||||||
'groups': {group.id: group.name for group in inst.groups}}
|
'groups': dict((group.id, group.name) for group in inst.groups),
|
||||||
|
}
|
||||||
try:
|
try:
|
||||||
instance_info['virtualization_type'] = getattr(inst,'virtualization_type')
|
instance_info['virtualization_type'] = getattr(inst,'virtualization_type')
|
||||||
except AttributeError:
|
except AttributeError:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue