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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user