summaryrefslogtreecommitdiffstats
path: root/nova/api
diff options
context:
space:
mode:
authorJake Dahn <jake@ansolabs.com>2011-08-05 16:20:53 -0700
committerJake Dahn <jake@ansolabs.com>2011-08-05 16:20:53 -0700
commitfe7f229c8ad91b1ae9187b8c541fdefd535eed9b (patch)
tree225308b2dad8b943f17e64d6aa0b08628b452e68 /nova/api
parentccea6c91b2314311587466d67d20f1583ddba1ee (diff)
moving try/except block, and changing syntax of except statement
Diffstat (limited to 'nova/api')
-rw-r--r--nova/api/openstack/contrib/floating_ips.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/nova/api/openstack/contrib/floating_ips.py b/nova/api/openstack/contrib/floating_ips.py
index 49ab88bb6..996a42abe 100644
--- a/nova/api/openstack/contrib/floating_ips.py
+++ b/nova/api/openstack/contrib/floating_ips.py
@@ -101,12 +101,12 @@ class FloatingIPController(object):
def delete(self, req, id):
context = req.environ['nova.context']
ip = self.network_api.get_floating_ip(context, id)
-
- try:
- if 'fixed_ip' in ip:
+
+ if 'fixed_ip' in ip:
+ try:
self.disassociate(req, id, '')
- except Exception, e:
- LOG.exception(_("Error disassociating fixed_ip %s"), e)
+ except Exception as e:
+ LOG.exception(_("Error disassociating fixed_ip %s"), e)
self.network_api.release_floating_ip(context, address=ip)