diff options
author | Jenkins <jenkins@review.openstack.org> | 2015-04-23 19:05:32 +0000 |
---|---|---|
committer | Gerrit Code Review <review@openstack.org> | 2015-04-23 19:05:32 +0000 |
commit | 1710bd50744300bcfe76367292036af20bc0feb0 (patch) | |
tree | 6188bb977f5045bebbb425ecfd3313efce28e044 | |
parent | 25acfcb24801613f5994f1e6e215d4b76f0dd527 (diff) | |
parent | 624a85c7eee4e4fb4f88ccc8bd52caa6c0423e89 (diff) | |
download | horizon-1710bd50744300bcfe76367292036af20bc0feb0.tar.gz |
Merge "Initialize variable 'networks' before referencing" into stable/kilo
-rw-r--r-- | openstack_dashboard/dashboards/project/instances/utils.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/openstack_dashboard/dashboards/project/instances/utils.py b/openstack_dashboard/dashboards/project/instances/utils.py index 730701247..5c2880126 100644 --- a/openstack_dashboard/dashboards/project/instances/utils.py +++ b/openstack_dashboard/dashboards/project/instances/utils.py @@ -86,6 +86,7 @@ def network_field_data(request, include_empty_option=False): :return: list of (id, name) tuples """ tenant_id = request.user.tenant_id + networks = [] try: networks = api.neutron.network_list_for_tenant(request, tenant_id) networks = [(n.id, n.name_or_id) for n in networks] @@ -121,7 +122,6 @@ def keypair_field_data(request, include_empty_option=False): keypair_list = [(kp.name, kp.name) for kp in keypairs] except Exception: exceptions.handle(request, _('Unable to retrieve key pairs.')) - keypair_list = [] if not keypair_list: if include_empty_option: |