nonetype error (#60603)

This commit is contained in:
Alex Stephen 2019-08-16 03:04:32 -07:00
commit 64e9973ae8

View file

@ -495,6 +495,7 @@ class InventoryModule(BaseInventoryPlugin, Constructable, Cacheable):
# Fetch all instances # Fetch all instances
link = self._instances % project link = self._instances % project
resp = self.fetch_list(params, link, query) resp = self.fetch_list(params, link, query)
if 'items' in resp and resp['items']:
for key, value in resp.get('items').items(): for key, value in resp.get('items').items():
if 'instances' in value: if 'instances' in value:
# Key is in format: "zones/europe-west1-b" # Key is in format: "zones/europe-west1-b"