[ovs-dev] [PATCH 02/11] python: Remove unused imports and variables.
Ben Pfaff
blp at ovn.org
Tue Jan 5 00:26:13 UTC 2016
On Tue, Dec 22, 2015 at 12:17:24PM -0500, Russell Bryant wrote:
> This resolves the following flake8 error types:
>
> F841 local variable 'e' is assigned to but never used
> F401 'exceptions' imported but unused
>
> Signed-off-by: Russell Bryant <russell at ovn.org>
Do these "try" statements actually do anything? It looks like they
immediately re-raise the exceptions they catch. Is that just a no-op?
> @@ -302,12 +301,12 @@ def set_dscp(sock, family, dscp):
> if family == socket.AF_INET:
> try:
> sock.setsockopt(socket.IPPROTO_IP, socket.IP_TOS, val)
> - except socket.error, e:
> + except socket.error:
> raise
> elif family == socket.AF_INET6:
> try:
> sock.setsockopt(socket.IPPROTO_IPV6, socket.IPV6_TCLASS, val)
> - except socket.error, e:
> + except socket.error:
> raise
> else:
> raise
Acked-by: Ben Pfaff <blp at ovn.org>
More information about the dev
mailing list