From 23460e64800d762a831449cbbbaedd2fab16fa6a Mon Sep 17 00:00:00 2001 From: joshainglis Date: Thu, 4 Jun 2015 17:59:53 +1000 Subject: [PATCH] Removed a dictionary comprehension for python 2.6 support --- plugins/inventory/ovirt.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/plugins/inventory/ovirt.py b/plugins/inventory/ovirt.py index bccd83de861..4cb4b09eaef 100755 --- a/plugins/inventory/ovirt.py +++ b/plugins/inventory/ovirt.py @@ -203,7 +203,9 @@ class OVirtInventory(object): inst.get_custom_properties() ips = [ip.get_address() for ip in inst.get_guest_info().get_ips().get_ip()] \ if inst.get_guest_info() is not None else [] - stats = {y.get_name(): y.get_values().get_value()[0].get_datum() for y in inst.get_statistics().list()} + stats = {} + for stat in inst.get_statistics().list(): + stats[stat.get_name()] = stat.get_values().get_value()[0].get_datum() return { 'ovirt_uuid': inst.get_id(),