Return an empty list instead of None when getting available networks

It is better to return an empty list because later 'insert' method
is used for this value

Change-Id: If4aa37fa272e545457607c299758bcc08d95cd6d
Closes-Bug: #1623109
This commit is contained in:
Tetiana Lashchova
2016-09-13 19:11:29 +03:00
parent 9f7f0b6b36
commit f9b9b37c72

View File

@@ -52,7 +52,7 @@ def get_available_networks(request, include_subnets=True,
tenant_id=tenant_id)
except exceptions.ServiceCatalogException:
LOG.warning("Neutron not found. Assuming Nova Network usage")
return None
return []
# Remove external networks
networks = [network for network in networks