]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commitdiff
Remove unused 'as e' in exception blocks
authorshihanzhang <shihanzhang@huawei.com>
Mon, 3 Mar 2014 01:11:29 +0000 (09:11 +0800)
committershihanzhang <shihanzhang@huawei.com>
Mon, 3 Mar 2014 10:08:35 +0000 (18:08 +0800)
Change-Id: I0bd26e1657a4e0ec40405d03d43aee9e10a13636
Closes-bug: #1287031

neutron/api/v2/resource.py
neutron/plugins/vmware/nsxlib/router.py

index fb139b2ac5a4b96fbe168c400f0325af67b9164a..34f724e15abfead60988f19c66f3c8956e369d53 100644 (file)
@@ -120,7 +120,7 @@ def Resource(controller, faults=None, deserializers=None, serializers=None):
                 {'NotImplementedError': e.message})
             kwargs = {'body': body, 'content_type': content_type}
             raise webob.exc.HTTPNotImplemented(**kwargs)
-        except Exception as e:
+        except Exception:
             # NOTE(jkoelker) Everything else is 500
             LOG.exception(_('%s failed'), action)
             # Do not expose details of 500 error to clients.
index 63bae2d3110bb44272a7412fea4a2d5d96ea0ea8..3f39e36e7383c9c15797b6181432a7850ee20e80 100644 (file)
@@ -591,7 +591,7 @@ def update_lrouter_port_ips(cluster, lrouter_id, lport_id,
         # Set is not JSON serializable - convert to list
         port['ip_addresses'] = list(ip_address_set)
         do_request(HTTP_PUT, uri, jsonutils.dumps(port), cluster=cluster)
-    except exception.NotFound as e:
+    except exception.NotFound:
         # FIXME(salv-orlando):avoid raising different exception
         data = {'lport_id': lport_id, 'lrouter_id': lrouter_id}
         msg = (_("Router Port %(lport_id)s not found on router "