From 699ef28045cd2da319859d24faba4d91e094be24 Mon Sep 17 00:00:00 2001 From: Joe Gordon Date: Tue, 19 Jun 2012 12:10:26 -0700 Subject: Minor HACKING.rst exception fix Change-Id: If7f7d57dd6c3d426ed6b29dc658a3ab964329644 --- nova/api/ec2/cloud.py | 3 ++- nova/api/openstack/compute/contrib/floating_ips.py | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'nova/api') diff --git a/nova/api/ec2/cloud.py b/nova/api/ec2/cloud.py index cfbb0894f..c3022e546 100644 --- a/nova/api/ec2/cloud.py +++ b/nova/api/ec2/cloud.py @@ -1138,8 +1138,9 @@ class CloudController(object): except exception.NoFloatingIpInterface: msg = _('l3driver call to add floating ip failed.') raise exception.EC2APIError(msg) - except: + except Exception: msg = _('Error, unable to associate floating ip.') + LOG.exception(msg) raise exception.EC2APIError(msg) def disassociate_address(self, context, public_ip, **kwargs): diff --git a/nova/api/openstack/compute/contrib/floating_ips.py b/nova/api/openstack/compute/contrib/floating_ips.py index a3dac71ae..0b7fa881e 100644 --- a/nova/api/openstack/compute/contrib/floating_ips.py +++ b/nova/api/openstack/compute/contrib/floating_ips.py @@ -253,8 +253,9 @@ class FloatingIPActionController(wsgi.Controller): except exception.NoFloatingIpInterface: msg = _('l3driver call to add floating ip failed') raise webob.exc.HTTPBadRequest(explanation=msg) - except: + except Exception: msg = _('Error. Unable to associate floating ip') + LOG.exception(msg) raise webob.exc.HTTPBadRequest(explanation=msg) return webob.Response(status_int=202) -- cgit