summaryrefslogtreecommitdiff
path: root/openstack_dashboard/dashboards/project/routers/views.py
diff options
context:
space:
mode:
authorKieran Spear <kispear@gmail.com>2013-08-13 16:54:59 +1000
committerKieran Spear <kispear@gmail.com>2013-08-13 17:21:32 +1000
commit242c8df495d8a22bd58797691989852d1b714824 (patch)
tree519d761d1989ca1aca0f98f9dd0cccfaa9f99874 /openstack_dashboard/dashboards/project/routers/views.py
parentfe659b231a9542e4703c13e7e1173aa7e0767cfc (diff)
downloadhorizon-242c8df495d8a22bd58797691989852d1b714824.tar.gz
Enable H201: do not write "except:"
Fixes all occurrences of this. We have a custom exception handler in Horizon anyway that only catches ClientException in most of these cases, but this commit lets us gate on the other cases. Change-Id: Iea3dc13817f3e5b775b2024424bf3a906da5584b Closes-Bug: #1211657
Diffstat (limited to 'openstack_dashboard/dashboards/project/routers/views.py')
-rw-r--r--openstack_dashboard/dashboards/project/routers/views.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/openstack_dashboard/dashboards/project/routers/views.py b/openstack_dashboard/dashboards/project/routers/views.py
index a4c06f955..26936d42d 100644
--- a/openstack_dashboard/dashboards/project/routers/views.py
+++ b/openstack_dashboard/dashboards/project/routers/views.py
@@ -48,7 +48,7 @@ class IndexView(tables.DataTableView):
routers = api.neutron.router_list(self.request,
tenant_id=tenant_id,
search_opts=search_opts)
- except:
+ except Exception:
routers = []
exceptions.handle(self.request,
_('Unable to retrieve router list.'))
@@ -100,7 +100,7 @@ class DetailView(tables.MultiTableView):
router_id = self.kwargs['router_id']
router = api.neutron.router_get(self.request, router_id)
router.set_id_as_name_if_empty(length=0)
- except:
+ except Exception:
msg = _('Unable to retrieve details for router "%s".') \
% (router_id)
exceptions.handle(self.request, msg, redirect=self.failure_url)
@@ -131,7 +131,7 @@ class DetailView(tables.MultiTableView):
device_id = self.kwargs['router_id']
ports = api.neutron.port_list(self.request,
device_id=device_id)
- except:
+ except Exception:
ports = []
msg = _('Port list can not be retrieved.')
exceptions.handle(self.request, msg)