From a5bc7965181c8fdc4fac0480292f9504826614d5 Mon Sep 17 00:00:00 2001 From: Matthew Jones Date: Mon, 12 Jan 2015 13:56:31 -0500 Subject: [PATCH] Fix an issue where host could be None during an instance bootup process thus causing an error in the inventory import --- awx/plugins/inventory/windows_azure.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/awx/plugins/inventory/windows_azure.py b/awx/plugins/inventory/windows_azure.py index 5f861660f1..1015fff7a4 100755 --- a/awx/plugins/inventory/windows_azure.py +++ b/awx/plugins/inventory/windows_azure.py @@ -103,7 +103,8 @@ class AzureInventory(object): if len(data) > 0: for host in set(reduce(lambda x, y: x + y, [i for i in data.values()])): - _meta[host] = self.get_host(host, jsonify=False) + if host is not None: + _meta[host] = self.get_host(host, jsonify=False) data['_meta'] = _meta # JSONify the data.